From 4ff9c71c91a0a6de0406ef8b8abbb8e96a84770b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 29 Jan 2012 12:23:17 +0100 Subject: Closes #810: fix deprecation warnings with Python 3. What is left over is from nose or docutils. --- sphinx/websupport/storage/differ.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sphinx/websupport/storage/differ.py') 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), -- cgit v1.2.1