mapping spaces to %20
I am rewriting a website, it used matts free e-commerce to do the cart stuff. when I click on my 'buy now' link the following appears in the URL fields of the browser: http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital%20ills,%20D K%20in%20DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html Zope generates http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital ills, DK in DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html To set zope to generate the same stuff I think I need a function but not sure how to implement. Got as far as <dtml-let web_title="replace(title, ' ', '%20')"> <dtml-var web_title> </dtml-let> But it is not quite correct, any ideas? ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards lostit@videonetwork.org +44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepage http://www.gifford.co.uk/~bedwards * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical news http://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
I would try... <dtml-var web_title url_quote> url_quote should handle escaping the string for you. Hope that helps. Ryan Ben Edwards wrote:
I am rewriting a website, it used matts free e-commerce to do the cart stuff. when I click on my 'buy now' link the following appears in the URL fields of the browser:
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital%20ills,%20D K%20in%20DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
Zope generates
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital ills, DK in DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
To set zope to generate the same stuff I think I need a function but not sure how to implement.
Got as far as
<dtml-let web_title="replace(title, ' ', '%20')"> <dtml-var web_title> </dtml-let>
But it is not quite correct, any ideas?
ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards lostit@videonetwork.org +44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepage http://www.gifford.co.uk/~bedwards * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical news http://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Ryan Dolensek Software Engineer Global Crossing (920)405-4812 rdolense@globalcrossing.com
Look at the dtml-var documentation. <dtml-var web_title url_quote> will do the conversion for you, html_quote and url_quote_plus are other useful options. -- Andy McKay. ----- Original Message ----- From: "Ben Edwards" <ben@videonetwork.org> To: <zope@zope.org> Sent: Tuesday, February 06, 2001 2:40 PM Subject: [Zope] mapping spaces to %20
I am rewriting a website, it used matts free e-commerce to do the cart stuff. when I click on my 'buy now' link the following appears in the URL fields of the browser:
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital%20ills,%20D
K%20in%20DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
Zope generates
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital ills, DK in DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
To set zope to generate the same stuff I think I need a function but not sure how to implement.
Got as far as
<dtml-let web_title="replace(title, ' ', '%20')"> <dtml-var web_title> </dtml-let>
But it is not quite correct, any ideas?
ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards lostit@videonetwork.org +44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepage http://www.gifford.co.uk/~bedwards * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical news http://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Ben, How about <dtml-var web_title url_quote> or &dtml-web_title; Phil ----- Original Message ----- From: "Ben Edwards" <ben@videonetwork.org> To: <zope@zope.org> Sent: Tuesday, February 06, 2001 10:40 PM Subject: [Zope] mapping spaces to %20
I am rewriting a website, it used matts free e-commerce to do the cart stuff. when I click on my 'buy now' link the following appears in the URL fields of the browser:
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital%20ills,%20D
K%20in%20DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
Zope generates
http://www.aitsafe.com/cf/add.cfm?userid=3594172&product=Capital ills, DK in DC&price=5&units=1&return=www.videonetwork.org/cd/catalogue.html
To set zope to generate the same stuff I think I need a function but not sure how to implement.
Got as far as
<dtml-let web_title="replace(title, ' ', '%20')"> <dtml-var web_title> </dtml-let>
But it is not quite correct, any ideas?
ben *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+ * Ben Edwards lostit@videonetwork.org +44 (0)7970 269 522 * * Campaign Against proper English, Dyslexia division * * Homepage http://www.gifford.co.uk/~bedwards * * i-Contact Progressive Video http://www.videonetwork.org * * Smashing the Corporate image http://www.subvertise.org * * Bristol's radical news http://www.bristle.co.uk * * Open Directory Project http://www.dmoz.org * *+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Andy McKay -
Ben Edwards -
Phil Harris -
Ryan M. Dolensek