Ticket #1270: html.diff

File html.diff, 606 bytes (added by scum, 10 years ago)

[patch] added unicode replacement (\u0027) to single quotes

  • html.py

     
    2424    "Returns the given HTML with ampersands, quotes and carets encoded"
    2525    if not isinstance(html, basestring):
    2626        html = str(html)
    27     return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;')
     27    return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;').replace("'","\u0027")
    2828
    2929def linebreaks(value):
    3030    "Converts newlines into <p> and <br />s"
Back to Top