Search code examples
javascriptphphtmlcsstags

Tags showing when i use TinyMCE to post new Paragraph


i'm using TinyMCE to post new Paragraph to the website

and after posting its showing the Paragraph like this:

<p>Some text</p>

so its posting the tags as well

how to solve this problem?

-This is how i'm printing the paragraph:

<p> {{$data->subtitle}} </p>

Solution

  • I was able to solve this problem by decode the string:

    <?php
      $str = $data->subtitle;
      echo html_entity_decode($str);
    ?>