Removing the double escape

This commit is contained in:
mlantz committed 2017-05-20 15:04:52 -04:00
1 parent 6ac052cbe5
commit 28df2ea235
4 files changed
+12 -24

No files matched your search

+2 -14
View File
@@ -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 '<li>' . $this->escapeAll($value) . '</li>';
return '<li>' . e($value) . '</li>';
}
}
@@ -461,7 +449,7 @@ class HtmlBuilder
}
if (! is_null($value)) {
return $key . '="' . $this->escapeAll($value) . '"';
return $key . '="' . e($value) . '"';
}
}