Welcome Guest, Not a member yet? Register   Sign In
form_input don't output html since ci3 upgrade
#1

Hello
first sorry for my english

i have upgraded my site to ci3 and i have a strange issue:
when i used form_input with html > it output converted html
see exemple:

php echo of my variable : Tom & Jerry

php echo in form input will display the source, not html render: Tom  & Jerry

any idea of where this problem could come from ?

i didn't have this issue with ci 2.2.6

this problem occur with all form_helper items (form_input, form_textarea...)
but if i use html instead of form input i don't have this issue

<?=form_input(array(
                        'id'    => 'nom',
                        'name'    => 'nom',
                        'size'    => '50',
                        'maxlength'    => '250',
                        'value' => set_value('nom', (isset($categorie->nom) ? $categorie->nom : ""))
 ));?>
> bug

-----


<input id="nom" name="nom" value="<?=set_value('nom', (isset($categorie->nom) ? $categorie->nom : ""))?>"></td>

> work fine


your help would be appreciated
Reply
#2

(This post was last modified: 07-11-2017, 10:57 AM by Wouter60.)

Add a third parameter to setvalue:
set_value('name', $value, FALSE);
It tells set_value() not to escape the value, because form_input() already does.
Reply
#3

thanks a lot it resolved the issue
Reply




Theme © iAndrew 2016 - Forum software by © MyBB