File: remove_cgi.patch

package info (click to toggle)
python-wikkid 0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 756 kB
  • sloc: python: 3,051; makefile: 12
file content (17 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--- a/wikkid/formatter/pygmentsformatter.py
+++ b/wikkid/formatter/pygmentsformatter.py
@@ -6,7 +6,7 @@
 
 """A text to html formatter using pygments."""
 
-import cgi
+import html
 
 from pygments import highlight
 from pygments.lexers import guess_lexer_for_filename
@@ -31,4 +31,4 @@
             lexer = guess_lexer_for_filename(filename, text)
             return highlight(text, lexer, HtmlFormatter())
         except ClassNotFound:
-            return "<pre>{0}</pre>".format(cgi.escape(text))
+            return "<pre>{0}</pre>".format(html.escape(text))