[TYPO3-english] htmlspecialchars encoding in menuitems

Christopher Torgalson bedlamhotel at gmail.com
Thu Jan 8 22:59:40 CET 2009


Hi,

On Thu, Jan 8, 2009 at 1:01 PM, Andreas Burg <typo3 at andreasburg.de> wrote:
> Stephan,
>
>>>> i have a menuitem in a TMENU "Blues / R&B"
>>>> the "&" doesn't get encoded (into &amp;) what can i do?
>
>> yeah, but i dont see why links are not generated automatically like the
>> should if i set doctype to xhtml_trans.
>
> AFAIK a "&" in text is not invalid xhtml, only in link parameters.


Wrong :)

"…ampersands used in a document that are to be treated as literal
characters must be expressed themselves as an entity reference (e.g.
"&amp;")." [1]

This is true whether or not they form part of a url--run an xhtml
document with plain ampersands in text through the w3c validator for
further information...

[1] http://www.w3.org/TR/xhtml1/#C_12

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list