0

is it correct that I cannot do things like:

   {{ Form::label('search',{!!__('messages.rep_findUsr')!!} )}}

do I need to store it before in a var and then pass it as argument?

or there is a faster way? thanks

JahStation
  • 893
  • 3
  • 15
  • 35

1 Answers1

0

You could simply set the fourth parameter to false to disable html escaped:

{{ Form::label('search',__('messages.rep_findUsr'), [], false) }}

Form::label declaration

public function label($name, $value = null, $options = [], $escape_html = true);
Ben
  • 5,069
  • 4
  • 18
  • 26
  • ok so my wrong step was about put double brackets inside another double... escaping is the next thing I guess... is it possible to insert those kinds of "special echo" even inside the "script/jQuery part" of the blade template? thanks – JahStation Mar 26 '18 at 11:01
  • `{{ }}` basically using `htmlspecialchars` php function to escape special characters, you can find the equivalent js function here (https://stackoverflow.com/questions/1787322/htmlspecialchars-equivalent-in-javascript) – Ben Mar 26 '18 at 14:09