I have a javascript variable that fills with Laravel translation system:
'are_you_sure' => '¿Remplacer l\'arbre?',
and then in JS:
swal({
title: "{{ trans('msg.are_you_sure') }}",
...
});
And it appears to me:
¿Remplacer l'arbre?
EDIT:
Sorry for htmlspecialchars, the thing is it doesn't change removing htmlspecialchars, adding it, or adding htmlspecialchars_decode
htmlspecialcharstakes a plain text string and turns it into HTML.i.e. exactly the opposite of what you want it to do
Look at
htmlspecialchars_decodeinstead.Beware
"and new line characters which will break the JS syntax.