|
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 |
andre Smarty Pro
Joined: 23 Apr 2003 Posts: 164 Location: Karlsruhe, Germany
|
Posted: Fri Sep 19, 2003 10:30 am Post subject: escape:"rawurl" |
|
|
I just wondered why there's no "rawurlencode()" in your espcape modifier?!
Here's an example:
<a href="mailto:abc@example.com?subject={$subject|escape:"url"}">...</a>
get's escaped to
<a href="mailto:abc@example.com?subject=Hi+World">...</a>
I would prefer the RFC1738 style escaping
<a href="mailto:abc@example.com?subject=Hi%20World">...</a>
Therefore I added Code: | case 'rawurl':
return rawurlencode($string); | to the switch statement of smarty_modifier_escape().
Any chance to have this in the default distribution of Smarty? |
|
Back to top |
|
law Smarty n00b
Joined: 20 Apr 2005 Posts: 2
|
Posted: Wed Apr 20, 2005 5:34 pm Post subject: |
|
|
Hello,
i'd like to move this up.
Just needed this funktione. Used {$var|rawurlencode} instead {$var|escape:"url"} would be nice to have thie one implemented since my solution seems to be a work around.
Would be nice to have this implemented. The patch seems to be trivial, but if there is any need, i might be able to post one. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Wed Apr 20, 2005 6:02 pm Post subject: |
|
|
Please upgrade.
escape:url has used rawurlencode() since Smarty 2.6.7. |
|
Back to top |
|
law Smarty n00b
Joined: 20 Apr 2005 Posts: 2
|
Posted: Wed Apr 20, 2005 6:43 pm Post subject: |
|
|
Narf, thx for the response.
Was using Smarty 2.6.6. |
|
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
|