diff --git a/src/FormBuilder.php b/src/FormBuilder.php
index 0e8db0f..5ec62db 100644
--- a/src/FormBuilder.php
+++ b/src/FormBuilder.php
@@ -485,7 +485,7 @@ class FormBuilder
// the element. Then we'll create the final textarea elements HTML for us.
$options = $this->html->attributes($options);
- return $this->toHtmlString('');
+ return $this->toHtmlString('');
}
/**
@@ -662,7 +662,7 @@ class FormBuilder
$html[] = $this->option($display, $value, $selected);
}
- return $this->toHtmlString('');
+ return $this->toHtmlString('');
}
/**
@@ -680,7 +680,7 @@ class FormBuilder
$options = ['value' => $value, 'selected' => $selected];
- return $this->toHtmlString('');
+ return $this->toHtmlString('');
}
/**
@@ -694,7 +694,7 @@ class FormBuilder
protected function placeholderOption($display, $selected)
{
$selected = $this->getSelectedValue(null, $selected);
-
+
$options = [
'selected' => $selected,
'disabled' => 'disabled',
@@ -702,7 +702,7 @@ class FormBuilder
'value' => ''
];
- return $this->toHtmlString('');
+ return $this->toHtmlString('');
}
/**
diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php
index e6bc518..e531792 100755
--- a/src/HtmlBuilder.php
+++ b/src/HtmlBuilder.php
@@ -53,18 +53,6 @@ class HtmlBuilder
return htmlentities($value, ENT_QUOTES, 'UTF-8', false);
}
- /**
- * Convert all applicable characters to HTML entities.
- *
- * @param string $value
- *
- * @return string
- */
- public function escapeAll($value)
- {
- return htmlentities($value, ENT_QUOTES, 'UTF-8');
- }
-
/**
* Convert entities to HTML characters.
*
@@ -399,7 +387,7 @@ class HtmlBuilder
if (is_array($value)) {
return $this->nestedListing($key, $type, $value);
} else {
- return '
' . $this->escapeAll($value) . '';
+ return '' . e($value) . '';
}
}
@@ -461,7 +449,7 @@ class HtmlBuilder
}
if (! is_null($value)) {
- return $key . '="' . $this->escapeAll($value) . '"';
+ return $key . '="' . e($value) . '"';
}
}
diff --git a/tests/FormBuilderTest.php b/tests/FormBuilderTest.php
index 40754e6..705673e 100644
--- a/tests/FormBuilderTest.php
+++ b/tests/FormBuilderTest.php
@@ -245,7 +245,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('', $form2);
$this->assertEquals('', $form3);
$this->assertEquals('', $form4);
- $this->assertEquals('', $form5);
+ $this->assertEquals('', $form5);
}
public function testSelect()
@@ -312,7 +312,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
$this->assertEquals(
$select,
- ''
+ ''
);
}
@@ -365,7 +365,7 @@ class FormBuilderTest extends PHPUnit_Framework_TestCase
['placeholder' => 'Select the ']
);
$this->assertEquals($select,
- ''
+ ''
);
}
diff --git a/tests/HtmlBuilderTest.php b/tests/HtmlBuilderTest.php
index 747c89a..3510c4e 100644
--- a/tests/HtmlBuilderTest.php
+++ b/tests/HtmlBuilderTest.php
@@ -47,7 +47,7 @@ class HtmlBuilderTest extends PHPUnit_Framework_TestCase
$ol = $this->htmlBuilder->ol($list, $attributes);
- $this->assertEquals('- foo
- bar
- &
', $ol);
+ $this->assertEquals('- foo
- bar
- &
', $ol);
}
public function testUl()
@@ -58,7 +58,7 @@ class HtmlBuilderTest extends PHPUnit_Framework_TestCase
$ul = $this->htmlBuilder->ul($list, $attributes);
- $this->assertEquals('', $ul);
+ $this->assertEquals('', $ul);
}
public function testMeta()