summaryrefslogtreecommitdiff
path: root/sphinx/websupport/storage/differ.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-01-29 12:23:17 +0100
committerGeorg Brandl <georg@python.org>2012-01-29 12:23:17 +0100
commit4ff9c71c91a0a6de0406ef8b8abbb8e96a84770b (patch)
tree70b948bd2b0830520cec26c05f04bfe1d27ccc40 /sphinx/websupport/storage/differ.py
parentcc8a4a812687f09e5b37116b199dada383e61103 (diff)
downloadsphinx-git-4ff9c71c91a0a6de0406ef8b8abbb8e96a84770b.tar.gz
Closes #810: fix deprecation warnings with Python 3. What is left over is from nose or docutils.
Diffstat (limited to 'sphinx/websupport/storage/differ.py')
-rw-r--r--sphinx/websupport/storage/differ.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/websupport/storage/differ.py b/sphinx/websupport/storage/differ.py
index 33fe54f34..fb3b8dc95 100644
--- a/sphinx/websupport/storage/differ.py
+++ b/sphinx/websupport/storage/differ.py
@@ -10,9 +10,10 @@
"""
import re
-from cgi import escape
from difflib import Differ
+from sphinx.util.pycompat import htmlescape
+
class CombinedHtmlDiff(object):
"""Create an HTML representation of the differences between two pieces
@@ -21,7 +22,7 @@ class CombinedHtmlDiff(object):
highlight_regex = re.compile(r'([\+\-\^]+)')
def __init__(self, source, proposal):
- proposal = escape(proposal)
+ proposal = htmlescape(proposal)
differ = Differ()
self.diff = list(differ.compare(source.splitlines(1),