Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
"html_options" modifier escaping HTML automaticall

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
cbj4074
Smarty Regular


Joined: 10 Nov 2011
Posts: 43

PostPosted: Thu Jul 05, 2012 5:30 pm    Post subject: "html_options" modifier escaping HTML automaticall Reply with quote

Hello,

I just upgraded from Smarty 3.0.8 -> 3.11.1 and am wondering if the "html_options" modifier now escapes HTML markup by default.

Whenever the array that I pass as the "options" argument contains literal HTML markup, the markup is escaped in the output that the template produces.

I noticed that the "html_checkboxes" and "html_radios" modifiers now accept an "escape" argument (a boolean value), but I see no such option for "html_options".

Thank you for any help.
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 698
Location: Germany, border to Switzerland

PostPosted: Thu Jul 05, 2012 5:56 pm    Post subject: Reply with quote

I don't understand why you'd pass HTML into {html_options} and expect it to be printed as html. As far as the specification is concerned, <option> may only contain text.

As far as checkboxes and radio buttons are concerned - they don't have any content at all. It's the wrapping <label>s that may have content. According to the specification that content may be any phrasing element (em, span, and a whole lot more).
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
cbj4074
Smarty Regular


Joined: 10 Nov 2011
Posts: 43

PostPosted: Thu Jul 05, 2012 6:40 pm    Post subject: Reply with quote

Thank you for the quick response. You're exactly right; please disregard!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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