Forum OpenACS Development: Re: ad_quotehtml speed improvement
The problem is, as far as I can see, the only reason why you would want to quote quotes, in within html-tags and especially links. But, at least within links, that is not correct at all... Why?
As you see, I'm using single quotes. This is perfectly legal, and often usefull because single quotes do not have any special meaning in Tcl. For example:
This is a text where some values like this one $var1 will be inserted automatically [funca]
Because of this property, I've learned myself to write html using single quotes and so I can code adp like above in all my vanilla AOLserver code.
So, do we want to quote ' too? It would solve the problem.
# For simplicity of example, would normally be done in .tcl file
set name "Daniël Mantione"
Whoops! Afaik, an URL should in all situation consist of standard US-Ascii. It is no solution to quote, ë won't work in a URL.
What should be done instead? This is, of course, ns_urlencode. This is true in any situation where a variable is being expanded within a tag attribute that specifies a URL. (I.e. A href, IMG src, LINK href etc...)
Unless there is another reason to quote ", the entire reason why it should be quoted is bogus...