|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
qietblog Smarty n00b
Joined: 20 Oct 2015 Posts: 2
|
Posted: Tue Oct 20, 2015 7:19 am Post subject: send url with QueryString |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Oct 20, 2015 5:17 pm Post subject: |
|
|
|escape:url |
|
Back to top |
|
qietblog Smarty n00b
Joined: 20 Oct 2015 Posts: 2
|
Posted: Tue Oct 20, 2015 6:27 pm Post subject: |
|
|
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 |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Tue Oct 20, 2015 7:47 pm Post subject: |
|
|
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 |
|
|
|
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
|