From f39f4db4ea39317c2754039286da9306fddc52d5 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 23 May 2018 20:41:50 +0000 Subject: [PATCH] Fixing the entities method --- src/Contracts/HtmlBuilder.php | 3 ++- src/HtmlBuilder.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Contracts/HtmlBuilder.php b/src/Contracts/HtmlBuilder.php index d018743..51723f3 100644 --- a/src/Contracts/HtmlBuilder.php +++ b/src/Contracts/HtmlBuilder.php @@ -17,10 +17,11 @@ interface HtmlBuilder * Convert an HTML string to entities. * * @param string $value + * @param bool $doubleEncode * * @return string */ - public function entities($value); + public function entities($value, $doubleEncode = false); /** * Convert all applicable characters to HTML entities. diff --git a/src/HtmlBuilder.php b/src/HtmlBuilder.php index 16d1398..728347c 100644 --- a/src/HtmlBuilder.php +++ b/src/HtmlBuilder.php @@ -48,12 +48,13 @@ public function __construct(UrlGenerator $url = null) * Convert an HTML string to entities. * * @param string $value + * @param bool $doubleEncode * * @return string */ - public function entities($value) + public function entities($value, $doubleEncode = false) { - return e($value); + return e($value, $doubleEncode); } /**