From 3996f82404a0f6704844b5aa1800dd881bde7db7 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 1 Feb 2020 16:30:41 +0100 Subject: [PATCH] relax encoding of slashes just for plaintext display, so links can be detected --- js/privatebin.js | 2 +- tpl/bootstrap.php | 2 +- tpl/page.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/privatebin.js b/js/privatebin.js index 4729128..21676bf 100644 --- a/js/privatebin.js +++ b/js/privatebin.js @@ -2424,7 +2424,7 @@ jQuery.PrivateBin = (function($, RawDeflate) { // escape HTML entities, link URLs, sanitize const escapedLinkedText = Helper.urls2links( - Helper.htmlEntities(text) + Helper.htmlEntities(text).split('/').join('/') ), sanitizedLinkedText = DOMPurify.sanitize(escapedLinkedText); $plainText.html(sanitizedLinkedText); diff --git a/tpl/bootstrap.php b/tpl/bootstrap.php index e2d9bc0..c777171 100644 --- a/tpl/bootstrap.php +++ b/tpl/bootstrap.php @@ -72,7 +72,7 @@ endif; ?> - + diff --git a/tpl/page.php b/tpl/page.php index 99f73cd..126c2a5 100644 --- a/tpl/page.php +++ b/tpl/page.php @@ -50,7 +50,7 @@ endif; ?> - +