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

{literal}

 
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 -> Smarty 3
View previous topic :: View next topic  
Author Message
metalkid
Smarty Rookie


Joined: 28 Mar 2009
Posts: 5

PostPosted: Sat Mar 28, 2009 3:08 am    Post subject: {literal} Reply with quote

In smarty3 can we look into dropping this for javascript blocks? Wouldn't it make sense to automatically literal out anything between <script> tags?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Sat Mar 28, 2009 3:20 am    Post subject: Reply with quote

smarty 3 already ignores braces that are surrounded by non word characters, so something like:

Code:
function foo {
   ....
}


will not need literal tags. this pretty much covers it for javascript and css, unless it somehow resembles smarty tags like {foo ...} or {$foo}


Last edited by mohrt on Sat Mar 28, 2009 3:36 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
metalkid
Smarty Rookie


Joined: 28 Mar 2009
Posts: 5

PostPosted: Sat Mar 28, 2009 3:35 am    Post subject: Reply with quote

ah very nice... drove me nuts, especially when i used smarty vars in the js, had literal tags everywhere Smile
Back to top
View user's profile Send private message
yarco
Smarty Regular


Joined: 20 Mar 2009
Posts: 39

PostPosted: Mon Mar 30, 2009 3:10 am    Post subject: Reply with quote

great!

So does that mean i don't need to redifine smarty delimiters to "{{" and "}}"?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Mon Mar 30, 2009 3:14 am    Post subject: Reply with quote

yarco wrote:
great!

So does that mean i don't need to redifine smarty delimiters to "{{" and "}}"?


Probably not.
Back to top
View user's profile Send private message Visit poster's website
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 -> 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