I'm using TurboGears 1.1b1dev_r4335 under OS X 10.5.3 on a G5 mac. I
find that flash content containing a comma will not display in Safari
if the controller method does a redirect, unless the comma is the last
character in the flash string. The comma does not cause a problem in
FireFox or Opera. I'm not sure if this is related to <a href="http://
trac.turbogears.org/ticket/1164">ticket 1164</a>. Here are a
controller.py and welcome.html for a quickstarted app that shows the
problem on my mac. (btw, I always need to change future = [] in
setup.py from svn to future = ["Elixir >= 0.4.0"] for quickstart to
work with TG 1.1).
controller.py
=============================
import turbogears as tg
from turbogears import controllers, expose, flash, redirect
class Root(controllers.RootController):
@expose(template="commatest.templates.welcome")
def index(self):
return dict()
@expose(template="commatest.templates.welcome")
def goodFlash(self):
flash("This flash, contains a comma")
return dict()
@expose(template="commatest.templates.welcome")
def badFlash(self):
flash("This flash, contains a comma")
redirect("/")
@expose(template="commatest.templates.welcome")
def okFlash(self):
flash("This flash contains a comma at the end,")
redirect("/")
============================
welcome.html
============================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type"
py:replace="''"/>
<title>Welcome to TurboGears</title>
</head>
<body>
<a href="goodFlash">return dict - This comma does not cause a problem</
a><br /><br />
<a href="okFlash">redirect - This comma does not cause a problem
because it is the last character</a><br /><br />
<a href="badFlash">redirect - This comma causes a problem</a>
</body>
</html>
============================
I see the same problem with TurboGears 1.0.4.4. Any help with this
would be appreciated.
Thanks,
Scott
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---