• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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
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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.