diff --git a/src/Illuminate/Support/helpers.php b/src/Illuminate/Support/helpers.php index caa682f3ec00..ddcbbed302dd 100755 --- a/src/Illuminate/Support/helpers.php +++ b/src/Illuminate/Support/helpers.php @@ -571,7 +571,7 @@ function dd(...$args) * @param bool $doubleEncode * @return string */ - function e($value, $doubleEncode = false) + function e($value, $doubleEncode = true) { if ($value instanceof Htmlable) { return $value->toHtml(); diff --git a/src/Illuminate/View/Compilers/BladeCompiler.php b/src/Illuminate/View/Compilers/BladeCompiler.php index 998783d98db0..05fa9dc81d24 100644 --- a/src/Illuminate/View/Compilers/BladeCompiler.php +++ b/src/Illuminate/View/Compilers/BladeCompiler.php @@ -480,12 +480,22 @@ public function setEchoFormat($format) } /** - * Set the echo format to double encode entities. + * Set the "echo" format to double encode entities. * * @return void */ - public function doubleEncode() + public function withDoubleEncoding() { $this->setEchoFormat('e(%s, true)'); } + + /** + * Set the "echo" format to not double encode entities. + * + * @return void + */ + public function withoutDoubleEncoding() + { + $this->setEchoFormat('e(%s, false)'); + } }