Ticket #1270: html.2.diff
File html.2.diff, 606 bytes (added by , 19 years ago) |
---|
-
html.py
24 24 "Returns the given HTML with ampersands, quotes and carets encoded" 25 25 if not isinstance(html, basestring): 26 26 html = str(html) 27 return html.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"') 27 return html.replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'","'") 28 28 29 29 def linebreaks(value): 30 30 "Converts newlines into <p> and <br />s"