Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-01-31 18:09:57

atbradley
Plugin Author
From: Rhode Island, US
Registered: 2007-02-15
Posts: 34
Website

Textpattern tags in link descriptions?

On one site I’m working on, I have several links saved with txp: tags in the link descriptions. I’m not clear whether this is supposed to work or not—it does, but only if you include the attribute escape="" in the @<txp:link_description /> tag. And it doesn’t work at all on error pages.

This:

<txp:link_description />

returns the text of the tag escaped into HTML entities (which makes sense, but isn’t quite intuitive). This:

<txp:link_description escape=""/>

parses the tags in the link description and returns the output—unless you’re on an error page, in which case the tags are left unparsed and sent to the browser as-is—where they’re ignored.

Using PHP to explicitly parse the tag works in all cases that I’ve found:

<txp:php>
echo parse(link_description(array('escape' => '')));
</txp:php>

So, is <txp:link_description /> supposed to parse any tags in the description? Why doesn’t it on 404 pages?

Offline

Board footer

Powered by FluxBB