Update of /cvsroot/jtoolkit/jToolkit/widgets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4893
Modified Files:
widgets.py
Log Message:
added escaping for refresh urls... avoiding the ? so mod_python gets the arguments properly...
Index: widgets.py
===================================================================
RCS file: /cvsroot/jtoolkit/jToolkit/widgets/widgets.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** widgets.py 9 Feb 2004 13:40:13 -0000 1.8
--- widgets.py 9 Feb 2004 13:47:31 -0000 1.9
***************
*** 24,27 ****
--- 24,29 ----
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ import urllib
+
class Widget:
def __init__(self, tagname = "widget"):
***************
*** 245,248 ****
--- 247,255 ----
result += """<meta http-equiv="Refresh" content="%d">""" % (refresh)
else:
+ # TODO: check out the URL escaping more thoroughly...
+ if '?' in refreshurl:
+ # escape query as spaces problems when refreshing...
+ querystart = refreshurl.find('?')+1
+ refreshurl = refreshurl[:querystart] + urllib.quote(refreshurl[querystart:])
result += """<meta http-equiv="Refresh" content="%d; URL=%s">""" % (refresh, refreshurl)
# stylesheet info
|