Forum Discussion
nag_54823
Aug 23, 2017Cirrostratus
URI::encode doesn't encode brace characters
Hi All,
I'm trying to encode an URL using URI::encode in IRULE. But it didn't encoded characters ( and ). Could you please help me to encode these characters with %28 and %29 respectively.
- Stanislas_Piro2Cumulonimbus
Hi,
weird behavior tested in both 11.5.4 and 13.0 versions... you can try string map:
when RULE_INIT { set test "(this is a test)" set test2 [URI::encode $test] set test3 [string map {"(" "%28" ")" "%29"} $test2] log local0. "$test $test2 $test3" }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects