Merge pull request #1676 from chrishow/form-label-html

Make HTML escaping optional for label contents.
This commit is contained in:
Taylor Otwell
2013-03-28 14:50:07 -07:00
3 changed files with 14 additions and 2 deletions

View File

@@ -111,9 +111,11 @@ class FormTest extends PHPUnit_Framework_TestCase {
{
$form1 = Form::label('foo', 'Foobar');
$form2 = Form::label('foo', 'Foobar', array('class' => 'control-label'));
$form3 = Form::label('foo', 'Foobar <i>baz</i>', null, false);
$this->assertEquals('<label for="foo">Foobar</label>', $form1);
$this->assertEquals('<label for="foo" class="control-label">Foobar</label>', $form2);
$this->assertEquals('<label for="foo">Foobar <i>baz</i></label>', $form3);
}
/**