fuel / helpers

FuelPHP Framework - Generic helpers library
MIT License
17 stars 7 forks source link

Html::tag() spec #8

Closed kenjis closed 10 years ago

kenjis commented 10 years ago

I have a question.

$attr = [
    'type' => 'text',
    'value' =>'H&M'
];
echo Html::tag('input', $attr).PHP_EOL;

The result is <input type="text" value="H&M"/>.

But the HTML is invalid. <input type="text" value="H&amp;M"/> is valid HTML.

Current spec seems users have to pass valid data (escaped data) as HTML. But isn't it better Html::tag() returns valid HTML?