Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

{strip} behaves differently

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
ctlajoie
Smarty Rookie


Joined: 20 Nov 2009
Posts: 29

PostPosted: Sat Nov 21, 2009 1:56 am    Post subject: {strip} behaves differently Reply with quote

In Smarty 2 when I used {strip} to remove unnecessary whitespace, I was able to explicitly add some inside by using {literal}. This no longer works in Smarty 3.. I believe it just removes all whitespace. Is this a bug, or was the {literal} trick never supposed to work anyway? If this is not a bug, is there a way to do this in Smarty 3?
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Sat Nov 21, 2009 11:37 am    Post subject: Reply with quote

I think this was not an intended behaviour of Smarty2, just a sideefekt of its implementation.

{literal} should just turn of the detection of Smarty tags and not change the behaviour how html tags get processed.

So the only solution in SMarty3 is to turn {strip} off and on. For the section which should not be stripped.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 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