Update of /cvsroot/mailman/mailman/Mailman/Gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29062
Modified Files:
Tag: Release_2_1-maint
GUIBase.py
Log Message:
handleForm(): Call out to self._escape() to make any entered data web-safe.
This allows subclasses to override where necessary. The default implementaton
is to call Utils.websafe().
Index: GUIBase.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Gui/GUIBase.py,v
retrieving revision 2.6.2.2
retrieving revision 2.6.2.3
diff -u -d -r2.6.2.2 -r2.6.2.3
--- GUIBase.py 13 Dec 2003 16:27:42 -0000 2.6.2.2
+++ GUIBase.py 17 Feb 2004 19:21:11 -0000 2.6.2.3
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 2002-2004 by the Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@@ -122,6 +122,9 @@
# Validate all the attributes for this category
pass
+ def _escape(self, property, value):
+ return Utils.websafe(value)
+
def handleForm(self, mlist, category, subcat, cgidata, doc):
for item in self.GetConfigInfo(mlist, category, subcat):
# Skip descriptions and legacy non-attributes
@@ -140,9 +143,10 @@
elif not cgidata.has_key(property):
continue
elif isinstance(cgidata[property], ListType):
- val = [Utils.websafe(x.value) for x in cgidata[property]]
+ val = [self._escape(property, x.value)
+ for x in cgidata[property]]
else:
- val = Utils.websafe(cgidata[property].value)
+ val = self._escape(property, cgidata[property].value)
# Coerce the value to the expected type, raising exceptions if the
# value is invalid.
try:
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org