# HG changeset patch # User Thomas De Schampheleire # Date 2018-02-12 09:34:17 # Node ID 494c793cc1601a34513e709243bc9656bf234d73 # Parent cbfc29a4c363bf25b69a360d16d9183b9c46aab8 lib: change ' to ' to satisfy Outlook HTML rendering The HTML entity ' (') did not exist in the HTML 4 spec [1] and was only added later. As Outlook (and Thunderbird) uses an old engine to render HTML and CSS, it does not recognize this entity and treats it as a literal string. Therefore, use the equivalent ' code which should be recognized by all browsers, even those restricted to HTML 4. [1] https://www.w3.org/TR/html4/sgml/entities.html diff --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py +++ b/kallithea/lib/helpers.py @@ -85,7 +85,7 @@ def html_escape(s): .replace(">", ">") .replace("<", "<") .replace('"', """) - .replace("'", "'") + .replace("'", "'") # some mail readers use HTML 4 and doesn't support ' ) def js(value): diff --git a/kallithea/tests/models/test_dump_html_mails.ref.html b/kallithea/tests/models/test_dump_html_mails.ref.html --- a/kallithea/tests/models/test_dump_html_mails.ref.html +++ b/kallithea/tests/models/test_dump_html_mails.ref.html @@ -94,7 +94,7 @@ View Comment: http://comment.org -
This is the new 'comment'.

- and here it ends indented.
+
This is the new 'comment'.

- and here it ends indented.
@@ -253,7 +253,7 @@ View Comment: http://comment.org -
This is the new 'comment'.

- and here it ends indented.
+
This is the new 'comment'.

- and here it ends indented.
@@ -430,7 +430,7 @@ View Comment: http://comment.org -
This is the new 'comment'.

- and here it ends indented.
+
This is the new 'comment'.

- and here it ends indented.
@@ -607,7 +607,7 @@ View Comment: http://comment.org -
This is the new 'comment'.

- and here it ends indented.
+
This is the new 'comment'.

- and here it ends indented.
@@ -728,7 +728,7 @@ Subject: Test Message - +
This is the 'body' of the "test" message
- nothing interesting here except indentation.
This is the 'body' of the "test" message
- nothing interesting here except indentation.
@@ -987,7 +987,7 @@ View Pull Request: http://pr.org/7 -
This PR is 'awesome' because it does <stuff>
- please approve indented!
+
This PR is 'awesome' because it does <stuff>
- please approve indented!
@@ -1162,7 +1162,7 @@ View Pull Request: http://pr.org/7 -
This PR is 'awesome' because it does <stuff>
- please approve indented!
+
This PR is 'awesome' because it does <stuff>
- please approve indented!