CVS: tmda-cgi LocalConfig.py,1.6,1.7

Gre7g Luterman <[email protected]>
Newsgroups gmane.mail.spam.tmda.cvs
Message-ID <[email protected]>
Update of /cvsroot/tmda/tmda-cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv30037

Modified Files:
	LocalConfig.py 
Log Message:
Need to escape out quotes in HTML fields.


Index: LocalConfig.py
===================================================================
RCS file: /cvsroot/tmda/tmda-cgi/LocalConfig.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- LocalConfig.py	14 May 2003 05:58:05 -0000	1.6
+++ LocalConfig.py	13 Jun 2003 21:50:09 -0000	1.7
@@ -35,6 +35,8 @@
 # Regular expression searches
 EscapeSearch  = re.compile('(\\")')
 EscapeSub     = r"\\\1"
+HTMLEscSearch = re.compile('"')
+HTMLEscSub    = "&quot;"
 CommentSearch = re.compile("^\s*(#.*)?$")
 ReturnSearch  = re.compile("\r?\n")
 ReturnSub     = "\\\\n"
@@ -241,7 +243,7 @@
             Value = repr(Value)
           else:
             Value = str(Value)
-        T[Parts[0]] = Value
+        T[Parts[0]] = HTMLEscSearch.sub(HTMLEscSub, Value)
         if len(Parts) > 2:
           for Part in Parts[1:]:
             if str(Value) == Part:

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.