summaryrefslogtreecommitdiff
path: root/Lib/difflib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-01-02 14:49:25 +0200
committerGitHub <noreply@github.com>2019-01-02 14:49:25 +0200
commit830ddc74c495ac1a5c03172a31006074967571a3 (patch)
treed3ccaa516ce24b6c46553bb76e793192f08a86da /Lib/difflib.py
parent3a374e0c5abe805667b71ffaaa7614781101ff4c (diff)
downloadcpython-git-830ddc74c495ac1a5c03172a31006074967571a3.tar.gz
Revert "bpo-35603: Escape table header of make_table output that can cause potential XSS. (GH-11341)" (GH-11356)
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,