summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2018-08-05 10:13:22 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2018-08-05 10:13:22 (GMT)
commiteb81aad9d5c9f42b480a52c22ea7e26e0ea5d4c2 (patch) (unidiff)
tree8d7a59ec76a439a65d27d319a34a06400715f198
parentcb47437dc165538a85fcc0a9a0c8ea59d403ab26 (diff)
downloadwikitrans-eb81aad9d5c9f42b480a52c22ea7e26e0ea5d4c2.tar.gz
wikitrans-eb81aad9d5c9f42b480a52c22ea7e26e0ea5d4c2.tar.bz2
Improve inter-version compatibility
* WikiTrans/wiki2html.py (HtmlTextNode): Use quote=False to make sure same output is obtained in Python 2.7 and 3.x * testdata/headings.html: Update
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--WikiTrans/wiki2html.py2
-rw-r--r--testdata/headings.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/WikiTrans/wiki2html.py b/WikiTrans/wiki2html.py
index 7c71602..00f02b5 100644
--- a/WikiTrans/wiki2html.py
+++ b/WikiTrans/wiki2html.py
@@ -105,7 +105,7 @@ class HtmlTextNode(HtmlSeqNode):
105 if isinstance(self.content,list): 105 if isinstance(self.content,list):
106 s = ''.join(self.content) 106 s = ''.join(self.content)
107 else: 107 else:
108 s = html_escape(self.content, quote=True) 108 s = html_escape(self.content, quote=False)
109 return s 109 return s
110 110
111class HtmlHdrNode(WikiHdrNode): 111class HtmlHdrNode(WikiHdrNode):
diff --git a/testdata/headings.html b/testdata/headings.html
index 905c46b..de9c9c3 100644
--- a/testdata/headings.html
+++ b/testdata/headings.html
@@ -5,7 +5,7 @@ sections. The Wiki software can automatically
5generate a <a href="http://en.wiktionary.org/wiki/table%20of%20contents">table of contents</a> from them.</p> 5generate a <a href="http://en.wiktionary.org/wiki/table%20of%20contents">table of contents</a> from them.</p>
6<h3>Subsection</h3> 6<h3>Subsection</h3>
7 7
8<p>Using more &quot;equals&quot; (=) signs creates a subsection.</p> 8<p>Using more "equals" (=) signs creates a subsection.</p>
9<h4>A smaller subsection</h4> 9<h4>A smaller subsection</h4>
10 10
11<p>Don't skip levels, 11<p>Don't skip levels,

Return to:

Send suggestions and report system problems to the System administrator.