Changeset - 494c793cc160
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 8 years ago 2018-02-12 09:34:17
thomas.de_schampheleire@nokia.com
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
2 files changed with 8 insertions and 8 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -82,13 +82,13 @@ def html_escape(s):
 
    """
 
    return (s
 
        .replace('&', '&')
 
        .replace(">", ">")
 
        .replace("<", "&lt;")
 
        .replace('"', "&quot;")
 
        .replace("'", "&apos;")
 
        .replace("'", "&#39;") # some mail readers use HTML 4 and doesn't support &apos;
 
        )
 

	
 
def js(value):
 
    """Convert Python value to the corresponding JavaScript representation.
 

	
 
    This is necessary to safely insert arbitrary values into HTML <script>
kallithea/tests/models/test_dump_html_mails.ref.html
Show inline comments
 
@@ -91,13 +91,13 @@ View Comment: http://comment.org
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="20px" style="width:20px"></td>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &apos;comment&apos;.<br/><br/> - and here it ends indented.</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &#39;comment&#39;.<br/><br/> - and here it ends indented.</div></div>
 
        </td>
 
        <td width="20px" style="width:20px"></td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
@@ -250,13 +250,13 @@ View Comment: http://comment.org
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="20px" style="width:20px"></td>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &apos;comment&apos;.<br/><br/> - and here it ends indented.</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &#39;comment&#39;.<br/><br/> - and here it ends indented.</div></div>
 
        </td>
 
        <td width="20px" style="width:20px"></td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
@@ -427,13 +427,13 @@ View Comment: http://comment.org
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="20px" style="width:20px"></td>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &apos;comment&apos;.<br/><br/> - and here it ends indented.</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &#39;comment&#39;.<br/><br/> - and here it ends indented.</div></div>
 
        </td>
 
        <td width="20px" style="width:20px"></td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
@@ -604,13 +604,13 @@ View Comment: http://comment.org
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
    <tr>
 
        <td width="20px" style="width:20px"></td>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &apos;comment&apos;.<br/><br/> - and here it ends indented.</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the new &#39;comment&#39;.<br/><br/> - and here it ends indented.</div></div>
 
        </td>
 
        <td width="20px" style="width:20px"></td>
 
    </tr>
 
    <tr>
 
        <td height="10px" style="height:10px" colspan="3"></td>
 
    </tr>
 
@@ -725,13 +725,13 @@ Subject: Test Message
 
                </tr>
 
                <tr>
 
                    <td></td>
 
                    <td>
 
<table cellpadding="0" cellspacing="0" border="0" width="100%">
 
    <tr>
 
        <td style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the &apos;body&apos; of the &quot;test&quot; message<br/> - nothing interesting here except indentation.</div></td>
 
        <td style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap"><div class="formatted-fixed">This is the &#39;body&#39; of the &quot;test&quot; message<br/> - nothing interesting here except indentation.</div></td>
 
    </tr>
 
</table>
 
                    </td>
 
                    <td></td>
 
                </tr>
 
                <tr>
 
@@ -984,13 +984,13 @@ View Pull Request: http://pr.org/7
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is &apos;awesome&apos; because it does &lt;stuff&gt;<br/> - please approve indented!</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is &#39;awesome&#39; because it does &lt;stuff&gt;<br/> - please approve indented!</div></div>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>Changesets:</div>
 
@@ -1159,13 +1159,13 @@ View Pull Request: http://pr.org/7
 
            </div>
 
        </td>
 
    </tr>
 
    <tr><td height="10px" style="height:10px"></td></tr>
 
    <tr>
 
        <td>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is &apos;awesome&apos; because it does &lt;stuff&gt;<br/> - please approve indented!</div></div>
 
            <div style="font-family:Lucida Console,Consolas,Monaco,Inconsolata,Liberation Mono,monospace;white-space:pre-wrap;color:#395fa0"><div class="formatted-fixed">This PR is &#39;awesome&#39; because it does &lt;stuff&gt;<br/> - please approve indented!</div></div>
 
        </td>
 
    </tr>
 
    <tr><td height="15px" style="height:15px"></td></tr>
 
    <tr>
 
        <td>
 
            <div>Changesets:</div>
0 comments (0 inline, 0 general)