how to get a correct URL escaped

10 views
Skip to first unread message

Eric Zhu

unread,
Feb 23, 2012, 3:04:45 PM2/23/12
to google-ctemplate
Hi, there,

I tried to use a template like this:

<body>
<a href="{{URL:url_escape_with_arg=html}}">Your Account</a>
</body>

and then I set the dict:
dict->SetValue("URL","http://1.2.3.4/a?b=b&c=1 2 3");
and expand it.

I expect it to be:
<a href="http://1.2.3.4/a?a=1&b=2&c=1%202%203">Your Account</a>
But I got:
http://1.2.3.4/a?a=1&amp;b=2&amp;c=cc&amp;d=1 2 3">

looks it's wrong!
How could I got it?

Thanks,
Eric

Olaf van der Spek

unread,
Feb 27, 2012, 8:07:23 AM2/27/12
to google-c...@googlegroups.com
Op donderdag 23 februari 2012 21:04:45 UTC+1 schreef Eric Zhu het volgende:
looks it's wrong!
How could I got it?
 

Reply all
Reply to author
Forward
0 new messages