I have plain text containing URL markup like this:
$string = "This is a good \[example\]\(http://www.example.com\) for my problem."
Now I would like to pass this variable $string
to a Blade template and parse it like this:
This is a good <a href='http://www.example.com'>example</a> for my problem.
However, since uses htmspecialchars the output looks like that:
This is a good < ;a href='http://www.example.com'> ;example< ;/a> ; for my problem.
At the moment, I parse the string with a custom function in a controller to the wanted output and present it in a Blade template with {! $parsed_string !}
. Is there a way to change the default behavior of the function in Laravel?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2hEwqTh
via IFTTT
Aucun commentaire:
Enregistrer un commentaire