Forum OpenACS Development: Re: ad_quotehtml speed improvement

Collapse
Posted by Daniël Mantione on
What the heck?

If would use <A href='@url@'>blablabla</A> you would get this url:

<A href='calculate-resistance?volt=2&amp;amp=2<blablabla>/A>
This is of course plain nonsense...

However, if you use the correct <A href='@url;noquote@'>blablabla</A> you get:

<A href='calculate-resistance?volt=2&amp=2'>blablabla</A>
... which is the correct way to pass the variables volt and amp to the url.

Quoting is allways wrong within links. URL-encoding is ok. I.e. if you want to pass a variable containing &, you would URL-encode it.

Collapse
Posted by Nis Jørgensen on
Daniël:  Did you test your own examples? In all my browsers, the first one works and the second one doesn't.

Tom: The relevant document to quote is the SGML standard (for HTML) or the XML standard (for XHTML). Luckily the XHTML standard has a nice little writeup of the issue:

http://www.w3.org/TR/xhtml1/#C_12

(notice the example given)