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.

1

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.