form_input don't output html since ci3 upgrade - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: form_input don't output html since ci3 upgrade (/showthread.php?tid=68441) |
form_input don't output html since ci3 upgrade - michaelv - 07-11-2017 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 RE: form_input don't output html since ci3 upgrade - Wouter60 - 07-11-2017 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. RE: form_input don't output html since ci3 upgrade - michaelv - 07-13-2017 thanks a lot it resolved the issue |