Skip to content

Commit aa56649

Browse files
committed
convert double-quote to " within html attributes.
Somehow, php-textile did this from the start while python-textile went with " instead. Now we match.
1 parent 288493d commit aa56649

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
def test_encode_html():
77
result = utils.encode_html('''this is a "test" of text that's safe to '''
88
'put in an <html> attribute.')
9-
expect = ('this is a &#34;test&#34; of text that&#39;s safe to put in an '
10-
'&lt;html&gt; attribute.')
9+
expect = ('this is a &quot;test&quot; of text that&#39;s safe to put in '
10+
'an &lt;html&gt; attribute.')
1111
assert result == expect
1212

1313
def test_has_raw_text():

textile/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def encode_html(text, quotes=True):
3939

4040
if quotes:
4141
a = a + (("'", '&#39;'),
42-
('"', '&#34;'))
42+
('"', '&quot;'))
4343

4444
for k, v in a:
4545
text = text.replace(k, v)

0 commit comments

Comments
 (0)