summaryrefslogtreecommitdiff
path: root/Lib/difflib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-12-29 17:42:05 +0200
committerGitHub <noreply@github.com>2018-12-29 17:42:05 +0200
commit13514f594de772d0e870ff680529d402b2ba8866 (patch)
tree42e1290e446d69815b65dc95831cd681db345e59 /Lib/difflib.py
parent78de01198b047347abc5e458851bb12c48429e24 (diff)
downloadcpython-git-revert-11341-bpo35603.tar.gz
Revert "bpo-35603: Escape table header of make_table output that can cause potential XSS. (GH-11341)"revert-11341-bpo35603
This reverts commit 78de01198b047347abc5e458851bb12c48429e24.
Diffstat (limited to 'Lib/difflib.py')
-rw-r--r--Lib/difflib.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/Lib/difflib.py b/Lib/difflib.py
index 4571817b98..887c3c26ca 100644
--- a/Lib/difflib.py
+++ b/Lib/difflib.py
@@ -2036,10 +2036,6 @@ class HtmlDiff(object):
s.append( fmt % (next_id[i],next_href[i],fromlist[i],
next_href[i],tolist[i]))
if fromdesc or todesc:
- fromdesc = fromdesc.replace("&", "&amp;").replace(">", "&gt;") \
- .replace("<", "&lt;")
- todesc = todesc.replace("&", "&amp;").replace(">", "&gt;") \
- .replace("<", "&lt;")
header_row = '<thead><tr>%s%s%s%s</tr></thead>' % (
'<th class="diff_next"><br /></th>',
'<th colspan="2" class="diff_header">%s</th>' % fromdesc,