1

I'm using Laravel 5.1 along with the HTML and form helpers, installed in the standard way described here. https://www.flynsarmy.com/2015/02/install-illuminatehtml-laravel-5/

However, when I try to use the HTML helper fuctions, the output is not correct.

My test view is:

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Test Page</title>
  {{ HTML::script('js/app.js') }}
</head>

<body>
</body>
</html>

But the html generated is:

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Test Page</title>
  &lt;script src=&quot;http://pilotapp.dev/js/app.js&quot;&gt;&lt;/script&gt;

</head>

<body>
</body>
</html>

And since all the brackets and quotes are incorrect the browser doesn't see it as a tag and just displays it as text. So I can see the issue, but I don't where to start looking to fix it.

Graham
  • 162
  • 1
  • 12
  • Possible duplicate of [Laravel 5: Display HTML with Blade](http://stackoverflow.com/questions/29253979/laravel-5-display-html-with-blade) – Gerard Reches Nov 18 '16 at 09:57

1 Answers1

1

{{ }} escapes the output. Try using the raw output {!! !!} instead.
Docs: http://laravel.com/docs/master/blade#displaying-data

s3v3n
  • 8,203
  • 5
  • 42
  • 56