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

escape:"rawurl"

 
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 -> Feature Requests
View previous topic :: View next topic  
Author Message
andre
Smarty Pro


Joined: 23 Apr 2003
Posts: 164
Location: Karlsruhe, Germany

PostPosted: Fri Sep 19, 2003 10:30 am    Post subject: escape:"rawurl" Reply with quote

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
View user's profile Send private message
law
Smarty n00b


Joined: 20 Apr 2005
Posts: 2

PostPosted: Wed Apr 20, 2005 5:34 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Apr 20, 2005 6:02 pm    Post subject: Reply with quote

Please upgrade.

escape:url has used rawurlencode() since Smarty 2.6.7.
Back to top
View user's profile Send private message
law
Smarty n00b


Joined: 20 Apr 2005
Posts: 2

PostPosted: Wed Apr 20, 2005 6:43 pm    Post subject: Reply with quote

Narf, thx for the response.

Was using Smarty 2.6.6.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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 -> Feature Requests 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