Categories:
Author:
Current version:
0.3
About It:
Get it:
Rate it:
Flag it:
sho_urlencode
sho_urlencode is an extremely simple plugin similar to etz_striptags. It passes its argument to the php rawurlencode function and should work with all versions of Textpattern.
It was necessary to create this plugin in order to get the Facebook Like button working for me and keeping any php code from the forms.
Examples
<txp:sho_urlencode><txp:permlink /></txp:sho:urlencode>
In case the permlink looked like this:
http://example.com/1/welcome-to-your-site
it would be converted to
http%3A%2F%2Fexample.com%2F1%2Fwelcome-to-your-site
Tag reference
The following tags can be used:
<txp:sho_urlencode><txp:permlink /></txp:sho:urlencode><txp:sho_rawurlencode><txp:permlink /></txp:sho:rawurlencode><txp:sho_urldecode>http://example.com/search?q=term</txp:sho:urldecode>will return “http%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dterm”<txp:sho_rawurldecode>foo%20bar%40baz</txp:sho:rawurldecode>will return “foo bar@baz”
History
- v0.3 fixed help text to show proper tag names (Issue #1) (05-07-2012)
- v0.2 enhanced plugin to allow all urlen/decode functions (12-07-2011)
- v0.1 initial release (11-07-2011)
Keywords/tags:
Initially released:
11-07-2011Posted here:
11 Jul 2011Article modified:
07 May 2012









If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:
Subscribe to this article's comments RSS feed. [ ? ] View Recent Comments across the site.