I would use {!! $post->content !!} and sanitize the output with a package like stevebauman/purify to get rid of anything nasty.
How to edit spatie/laravel-markdown html elements (blocks)
Hey!
I installed spatie/laravel-markdown and implemented it in my code by adding <x-markdown>{{ $post->content }}</x-markdown> (note that it's not <x-markdown>{!! $post->content !!}</x-markdown> - which one is the right way?) where the post is displayed (I have no idea if that is the right implementation of this package). Adding the triple " ` " before and after a code/text while posting a thread results in this:

(I show that the box with the code goes beyond the field of the main box)
How can I edit these markdown html elements the best way? Also do you have any suggestions on how to use this package the best&securely way?
P.S.: I tried Sinnbeck's package but some errors occur on installation (through composer)
Please or to participate in this conversation.



