6 messages in com.googlegroups.pylons-discussRe: url_for and ampersands encoding
FromSent OnAttachments
Max Ischenko27 Mar 2007 03:19 
Robert Leftwich27 Mar 2007 03:32 
Max Ischenko27 Mar 2007 09:38 
Ian Bicking27 Mar 2007 10:27 
Shannon -jj Behrens28 Mar 2007 17:43 
Shannon -jj Behrens28 Mar 2007 17:45 
Subject:Re: url_for and ampersands encoding
From:Shannon -jj Behrens (jjin@public.gmane.org)
Date:03/28/2007 05:43:30 PM
List:com.googlegroups.pylons-discuss

On 3/27/07, Max Ischenko <isch@public.gmane.org>
wrote:

Hi,

I am trying to validate my XHTML page (generated with Pylons/Mako) and got an error: http://validator.w3.org/check?uri=http%3A%2F%2Ftesting.developers.org.ua%2F

Warning Line 104 column 41: cannot generate system identifier for general entity "norestart". | <a href="/_pylons/selfupdate?svnup=yes&norestart=yes">Update</a> Obviously, w3c validators expects & to be encoded as &amp; while it isn't. The url in question is generated with | <a href="${h.url_for(controller='selfupdate', svnup='yes', norestart='yes')}">Update</a>

What should I do to automatically convert & to &amp;? Do I need to write a Mako filter? Does current behaviour correct/expected?

Oh oh oh!!! I wrote all about this here:

http://jjinux.blogspot.com/2006/03/html-escaping-s-in-urls-in-html.html

Happy Hacking! -jj