Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.3
About It:
Get it:
Rate it:
  • Helpful?
  • 0 Yes
  • 3 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

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)
Article Request Count:
Keywords/tags:
Initially released:
11-07-2011
Posted here:
11 Jul 2011

You know you want to visit the Archives.
Published with Textpattern