changeset 4:1727286834b5

Do not replace & with & for text to show &#xxxx;
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 29 Oct 2010 17:49:10 +0800
parents f181a1ba4f9f
children d310e097c6de
files tools.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tools.py	Wed Feb 13 22:37:14 2008 +0800
+++ b/tools.py	Fri Oct 29 17:49:10 2010 +0800
@@ -127,7 +127,7 @@
 	import types
 	if not (isinstance(data, types.StringTypes) and self.safe):
 	    return str(data)
-	return str(data.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;'))
+	return str(data.replace('<', '&lt;').replace('>', '&gt;'))
     
     def _esc_cdata(self, data):
 	import types