When there is & in the input string to Exec(), it returns &. When I pass the output of Exec() to url.QueryEscape() or url.PathEscape(), I get %26amp%3B and &%3B respectively.
This is happening for a quote(') also.
Because of this, what I am doing is I am replacing & with & and ' with '.
Is there any way to skip the encoding of & and ' or any special character in Exec()? Is there any better way to handle this?
I cannot change the template/source contents. It uses {{ . I cannot change these to the triple mustache {{{
Hello raymond dev team,
When there is & in the input string to
Exec()
, it returns&
. When I pass the output ofExec()
tourl.QueryEscape()
orurl.PathEscape()
, I get %26amp%3B and &%3B respectively. This is happening for a quote(') also.Because of this, what I am doing is I am replacing
&
with&
and'
with'
.Is there any way to skip the encoding of
&
and'
or any special character inExec()
? Is there any better way to handle this?I cannot change the template/source contents. It uses {{ . I cannot change these to the triple mustache {{{
Thanks, Raghav