Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-01-26 06:51:27
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
How do I sanitise title tag to output "CGI friendly code"?
I’m building an Add to Google Calendar link on certain pages. Easy, except when the article title has an ampersand. Textpattern neatly encodes it as &
but this is a “special character” for CGI parameter values, and Google recommends the CGI friendly alternative i.e. %26
Is there a plugin or other way to force the title
tag to output “CGI friendly code” ?
Last edited by nardo (2010-01-26 06:51:57)
Offline
Re: How do I sanitise title tag to output "CGI friendly code"?
With rah_replace:
<txp:rah_replace from="&" to="%26">
My code with &
</txp:rah_replace>
Offline
#3 2010-01-26 07:33:13
- nardo
- Member
- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: How do I sanitise title tag to output "CGI friendly code"?
sweet as
thanks Jukka
Offline