[Pkg-privacy-commits] [onionshare] 58/256: Revert "Replaced sanitize_html() function that was based on regex with python3's html.escape()"

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

ulrike pushed a commit to branch master
in repository onionshare.

commit e1f9957f56827e14e3177a28de676216ad81487f
Author: Garrett Robinson <garrett.f.robinson at gmail.com>
Date:   Fri Dec 30 12:02:40 2016 -0500

    Revert "Replaced sanitize_html() function that was based on regex with python3's html.escape()"
    
    This reverts commit cff11cd7e48fe4e94ef484ba1f1095362330452d.
---
 onionshare/web.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/onionshare/web.py b/onionshare/web.py
index 8af634e..d7116bb 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 """
-import queue, mimetypes, platform, os, sys, socket, logging, html
+import queue, mimetypes, platform, os, sys, socket, logging, re
 from urllib.request import urlopen
 from flask import Flask, Response, request, render_template_string, abort
 
@@ -42,7 +42,7 @@ def set_file_info(filenames, processed_size_callback=None):
     file_info = {'files': [], 'dirs': []}
     for filename in filenames:
         # strips trailing '/' and sanitizes filename
-        basename = html.escape(os.path.basename(filename.rstrip('/')))
+        basename = sanitize_html(os.path.basename(filename.rstrip('/')))
         info = {
             'filename': filename,
             'basename': basename

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list