 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
cbj4074 Smarty Regular
Joined: 10 Nov 2011 Posts: 43
|
Posted: Thu Jul 05, 2012 5:30 pm Post subject: "html_options" modifier escaping HTML automaticall |
|
|
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 |
|
rodneyrehm Administrator

Joined: 30 Mar 2007 Posts: 698 Location: Germany, border to Switzerland
|
Posted: Thu Jul 05, 2012 5:56 pm Post subject: |
|
|
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 |
|
cbj4074 Smarty Regular
Joined: 10 Nov 2011 Posts: 43
|
Posted: Thu Jul 05, 2012 6:40 pm Post subject: |
|
|
| Thank you for the quick response. You're exactly right; please disregard! |
|
| Back to top |
|
|
|
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
|