I'm using smarty template engine. In smarty code I've used stripslashes function to remove the extra slashes appearing in a string but the slashes are not getting removed. How shold I resolve this issue?
Following is the string and the code that I'm using to remove these slashes:
String : {assign var="brand" value="Lindeman's"}
The code I written : {$brand|stripslashes}
The output I'm getting is : Lindeman\\'s
The output should actually be : Lindeman's
How should I achieve this?
Thanks in advance.
If desired output for you is Lindeman's
and you set your string as:
{assign var="brand" value="Lindeman's"}
to display it, you should simply use:
{$brand}
You don't need to use any stripslashes here because you want to display the same string as you have inside your variable
EDIT
And even when I use
{$brand|stripslashes}
I get the exactly same output: Lindeman's
so probably you do something wrong or your input string is different.