Hi; I can work around this one, but it's not as elegant and will waste an hour or so. Here's the problem I'd like to resolve. I have this line of code: <a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}">test</a> The problem is that "doc" comes back with all the special characters in ASCII: <a href="http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=<div><input type="hidden" name="redirect_cmd" value="_cart"> etc. Is there a way to work around this? TIA, Tony ________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
--On 15. August 2007 12:48:06 -0400 tonylabarbara@aol.com wrote:
Hi; I can work around this one, but it's not as elegant and will waste an hour or so. Here's the problem I'd like to resolve. I have this line of code:
<a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditS tuff}">test</a>
The problem is that "doc" comes back with all the special characters in ASCII:
<a href="http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=<di v><input type="hidden" name="redirect_cmd" value="_cart">
Yes, fix your code. Passing around HTML snippets through URLs just bad-style. Otherwise look at the url_quote/url_quote_plus() methods as mentioned some mails earlier. -aj
tonylabarbara@aol.com wrote:
<a href="http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=<div><input type="hidden" name="redirect_cmd" value="_cart">
etc. Is there a way to work around this?
Of course not, you don't need url quoting, that would be silly ;-) Chris PS: Why on *earth* you're passing around lumps of html in parameters anyway is *totally* beyond me... -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Well, the other fellow said url_quote was well documented, but I haven't found out where :) Since you strongly imply I need url quoting, can you tell me how to url_quote this "doc" parameter? <a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}"> Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once it's working, I'll make it cleaner ;) TIA, Tony -----Original Message----- From: Chris Withers <chris@simplistix.co.uk> To: tonylabarbara@aol.com Cc: zope@zope.org Sent: Wed, 15 Aug 2007 12:54 pm Subject: Re: [Zope] Another "Structure" Problem tonylabarbara@aol.com wrote:?
<a href="http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=<div><input type="hidden" name="redirect_cmd" value="_cart">?
etc. Is there a way to work around this?? ? Of course not, you don't need url quoting, that would be silly ;-)? ? Chris? ? PS: Why on *earth* you're passing around lumps of html in parameters anyway is *totally* beyond me...? ? -- Simplistix - Content Management, Zope & Python Consulting? ? - http://www.simplistix.co.uk?
________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
Perhaps you put the name of a template as doc and in this template render the html code you want to render (like in this example a hidden input) Only an idea... 2007/8/15, tonylabarbara@aol.com <tonylabarbara@aol.com>:
Well, the other fellow said url_quote was well documented, but I haven't found out where :) Since you strongly imply I need url quoting, can you tell me how to url_quote this "doc" parameter?
<a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}">
Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once it's working, I'll make it cleaner ;) TIA, Tony
-----Original Message----- From: Chris Withers <chris@simplistix.co.uk> To: tonylabarbara@aol.com Cc: zope@zope.org Sent: Wed, 15 Aug 2007 12:54 pm Subject: Re: [Zope] Another "Structure" Problem
tonylabarbara@aol.com wrote:
<a href=" http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=<div><input<http://203.223.152.46:8080/lariman.com/s/renumberTheCart?doc=+%3Cdiv%3E%3Cinput>type="hidden" name="redirect_cmd" value="_cart">
etc. Is there a way to work around this?
Of course not, you don't need url quoting, that would be silly ;-)
Chris
PS: Why on *earth* you're passing around lumps of html in parameters anyway is *totally* beyond me...
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ------------------------------ AOL now offers free email to everyone. Find out more about what's free from AOL at *AOL.com* <http://www.aol.com?ncid=AOLAOF00020000000437>.
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
-- Mis Cosas http://blogs.sistes.net/Garito
tonylabarbara@aol.com wrote:
<a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}">
Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once it's working, I'll make it cleaner ;)
No, it's insane. You have *absolutely* no business passing html round like this> Stop and totally rethink what you are doing... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
It's insane. It's working. Now that it's working, I can take my time, sit down and figure out a good, clean solution. But at least I've got the darn thing working! Thanks for your help, Chris. Tony -----Original Message----- From: Chris Withers <chris@simplistix.co.uk> To: tonylabarbara@aol.com Cc: zope@zope.org Sent: Thu, 16 Aug 2007 3:33 am Subject: Re: [Zope] Another "Structure" Problem tonylabarbara@aol.com wrote:?
<a tal:attributes="href string:${here/renumberTheCart/absolute_url}?doc=${here/CheckOutAfterEditStuff}">?
Yes, it's sloppy, but I'm trying to resolve one problem at a time. Once it's working, I'll make it cleaner ;)? ? No, it's insane. You have *absolutely* no business passing html round like this>? ? Stop and totally rethink what you are doing...? ? Chris? ? -- Simplistix - Content Management, Zope & Python Consulting? ? - http://www.simplistix.co.uk?
________________________________________________________________________ AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
participants (4)
-
Andreas Jung -
Chris Withers -
Garito -
tonylabarbara@aol.com