Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

send url with QueryString

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
qietblog
Smarty n00b


Joined: 20 Oct 2015
Posts: 2

PostPosted: Tue Oct 20, 2015 7:19 am    Post subject: send url with QueryString Reply with quote

Hi
I want send a url with querystring; but can not
where is my Error?
help me plz...
(My id posted but url...)

Code:
<a href="http://mysite.com/a.php?id={$h.id}&url={$h.url}"  title="{$h.title|html_decode}"  rel="noreferrer" target="_blank">
{$h.title|html_decode}
</a>
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Oct 20, 2015 5:17 pm    Post subject: Reply with quote

|escape:url
Back to top
View user's profile Send private message
qietblog
Smarty n00b


Joined: 20 Oct 2015
Posts: 2

PostPosted: Tue Oct 20, 2015 6:27 pm    Post subject: Reply with quote

AnrDaemon wrote:
|escape:url


-------------

thanks.
That would replace the code in this case???
more information plz....

Code:
<a href="http://mysite.com/a.php?id={$h.id}&url={$h.url|escape:url}"  title="{$h.title|html_decode}"  rel="noreferrer" target="_blank">
{$h.title|html_decode}
</a>


and how is change it to default?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue Oct 20, 2015 7:47 pm    Post subject: Reply with quote

All resource references in attributes must be escaped with URL mode.

If your code does not substitute ANYTHING for h.url, it is likely you did not pass the value to the template in first place.
Please ude debug tools to check the values to pass to the template.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP