[TYPO3-dev] ABout pi_getPageLink(..) usage of & and & in the URL

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Dec 18 17:35:19 CET 2006


Christopher Torgalson schrieb:
> Hello,
> 
> On 12/18/06, Dmitry Dulepov <dmitry at typo3.org> wrote:
> 
>> Hi!
>>
>> Steffen Kamper wrote:
>> > AFAIK this is not done by any link funktion but by the method
>> > xhtml_cleaning = all
>> >
>> > so this is a post-method
>>
>> Absolutely correct.

No. pi_getPageLink(..) returns the URL. As explained in a similar thread in 
the English list, there is no HTML escapeing as a URL on its own may be 
used in plain text and many other places besides HTML. If an extension uses 
pi_getPageLink(..) and makes a link like this

  return '<a href="'.pi_getPageLink(..).'">'

its broken. pi_base has many functions to generate anchors, so use them 
(correctly).

> This is odd--it's been a published goal since ~3.6 that TYPO3's html
> output should be xhtml compliant. Why are links exempt?

They aren't. TYPO3 genreates correct anchor tags. Any TS code or extension 
that requests a plain URL, must do the HTML encoding itself. See above why.

Masi




More information about the TYPO3-dev mailing list