Preferred method of outputting strings into forms

Permalink
Hi

Is there a preferred method od outputting strings into forms?

I have found the text helper none of its functions will stop something like this breaking a form's output

"<script>alert("a")</script>


It strips the tags, but leaves in the first double quote, which breaks value="" within an input.

Thanks

yolk
 
synlag replied on at Permalink Reply
synlag
Hi,

what about:

$th = Loader::helper(‘text’);
$text = $th->entities($text);


Greets
yolk replied on at Permalink Reply
yolk
That won't fix the single or double quote issue?