Forums / Developer / URL encode?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

URL encode?

Author Message

Jeroen de Jong

Wednesday 25 July 2007 4:51:51 am

Is there anyway to urlencode an url (using %20 to replace empty espace between words)?
Somthing like "str_replace" in PHP?

There are many string operators (like | chr, | ord, | crc32) that convert my string into many exotic formats....BUT NO URL encode?

please help

Łukasz Serwatka

Wednesday 25 July 2007 7:28:11 am

Hi,

Put in your template.ini.append.php:

[PHP]
PHPOperatorList[rawurldecode]=rawurldecode
PHPOperatorList[rawurlencode]=rawurlencode

Then you can use in templates input|rawurlencode or input|rawurldecode

Remember to clear the cache once you added those settings.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog