Andresh Podzimovsky
Andresh Podzimovsky

Reputation: 1561

How to turn off html escape in Smarty

I am using html_checkboxes for generating select menu. The problem is that in the checkbox name I have some html code and Smarty escapes it.

I have:

{html_checkboxes name='select_menu' values=$user_data[1] output=$user_data[2]}

I get:

Status: <span style="color: blue">Normal</span>

I need that status would be just blue.

Upvotes: 3

Views: 9960

Answers (2)

Sunny12
Sunny12

Reputation: 111

There is no correct answer above, even though the last answer is quite close..

check this link out http://www.smarty.net/docs/en/variable.escape.html.tpl

the correct answer should be {$var nofilter}

Upvotes: 11

Andresh Podzimovsky
Andresh Podzimovsky

Reputation: 1561

The solution was escape:false

{html_checkboxes name='select_menu' values=$user_data[1] output=$user_data[2] escape:false}

Upvotes: 2

Related Questions