Laravel Form & HTML Escaped

Published 11 months ago by masandikdev


how to not escaped when using laravel html form, its okay when using input but have problem when using textarea. i have form to submit content that have spintag text that contain {{ and }}.

Form result with input

{{test}} text is {good|excelent|nice} example

Form result in textarea

text is {good|excelent|nice} example

any advice, why its escaped when using textarea. thanks


That is risky to unescape the user entered data. but you can use {!! !!}


i already do that and still not showed when i get data from database and loop it like.

{!! Form::textarea($value->id, $value->value, ['class' => 'form-control']) !!}

but when using Form Text its working without escaped.


even when im using html instead laravel form like:

<div class="col-md-7">
<textarea name="{{ $value->id }}" cols="50" rows="10" id="{{ $value->id }}" class="form-control">{!! $value->value !!}</textarea>

still its not working, so its html / browser issue not laravel issues. thanks


Maybe give {{{ }}} a try.


same, just try with that. i think i can stick with input rather than textarea.

Please sign in or create an account to participate in this conversation.