UEDITOR saved to the database HTML string, output when escaping how to solve?

actual effect picture:

clipboard.png

the expected effect is, of course, that all tags are parsed normally and work.

I use the following code to find that

I am the HTML code

this can be parsed, but {{$article- > content}} just can"t.

@extends("layouts/app")
@section("title",  $article->name)

@section("content")
    <div class="container-fluid">
        

{{ $article->name }}

<div id="div"></div> </div> <script> const dobj = document.getElementById("div"); // dobj.innerHTML = "

HTML

"; dobj.innerHTML = "{{ $article->content }}

HTML

"; </script> @endsection

this article was first published in the Laravel China community
connotative paragraph TV

Mar.20,2021

resolved: do not use js,

   <div id="div"> <?php echo $article->content ?> </div>
Menu