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

Smarty Replace Quotes Problem

 
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
gusto
Smarty Rookie


Joined: 11 Jun 2008
Posts: 14

PostPosted: Wed Jun 11, 2008 2:14 pm    Post subject: Smarty Replace Quotes Problem Reply with quote

Hello,
I have a problem replacing quotes.

How can I do this I tried:

{$variable.NAME|escape|trim|lower|replace:"%22":""| etc

and even

{$variable.NAME|escape|trim|lower|replace:""":""| etc

they get smarty errors.

Any ideas please for replacing " and ' quotes? please
Back to top
View user's profile Send private message
Celeb
Administrator


Joined: 17 Apr 2007
Posts: 1025
Location: Vienna

PostPosted: Wed Jun 11, 2008 2:24 pm    Post subject: Reply with quote

Have you tried this?
Code:
{$variable|replace:"\"":"'"}

_________________
Darn computers always do what I tell them to instead of what I want them to do.
Back to top
View user's profile Send private message
gusto
Smarty Rookie


Joined: 11 Jun 2008
Posts: 14

PostPosted: Wed Jun 11, 2008 3:29 pm    Post subject: Hello thanks for the reply however that did not work for me Reply with quote

Hello thanks for the reply however that did not work for me. Any other ideas please? There is no error with that but it does not replace " quotes.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Jun 11, 2008 3:36 pm    Post subject: Reply with quote

What's about
Code:
{$variable|replace:'"':"'"}
Back to top
View user's profile Send private message
gusto
Smarty Rookie


Joined: 11 Jun 2008
Posts: 14

PostPosted: Thu Jun 12, 2008 6:41 am    Post subject: Reply with quote

I finally figured it out! Razz

replace:"&#039"|replace:""":""| works to replace ' and " quotes respectively.... Surprised finally! Idea


thanks for everyones help as that ruled many things out


Last edited by gusto on Thu Jun 12, 2008 6:42 am; edited 1 time in total
Back to top
View user's profile Send private message
gusto
Smarty Rookie


Joined: 11 Jun 2008
Posts: 14

PostPosted: Thu Jun 12, 2008 6:41 am    Post subject: Reply with quote

gusto wrote:
I finally figured it out! Razz

replace:"'&#039"|replace:""":""| works to replace ' and " quotes respectively.... Surprised finally! Idea


thanks for everyones help as that ruled many things out
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