Skip to content

Commit

Permalink
Merge pull request #24 from ARCANEDEV/patch-1
Browse files Browse the repository at this point in the history
Fixing the entities method
  • Loading branch information
arcanedev-maroc authored May 23, 2018
2 parents 4ed9d0e + f39f4db commit 2845d18
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Contracts/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
5 changes: 3 additions & 2 deletions src/HtmlBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 2845d18

Please sign in to comment.