久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Laravel 5 Form::model(...) 默認轉義?

Laravel 5 Form::model(...) escaped by default?(Laravel 5 Form::model(...) 默認轉義?)
本文介紹了Laravel 5 Form::model(...) 默認轉義?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

也許這是我遺漏的一件簡單的事情,但在我的 laravel 刀片模板中,我有類似的東西:

Maybe this is a simple thing that I'm missing, but in my laravel blade template I have something like:

{{ Form::model(....) }}
    ... my fields ...
{{ Form::close() }}

這會產生轉義的 HTML,因此表單標簽實際上會打印到屏幕上.但是,如果我這樣做:

This results with escaped HTML so the form tag is actually printed to the screen. However, if I do:

{!! Form::model(....) !!}
    ... my fields ...
{!! Form::close() !!}

它按預期工作.我是否總是需要使用 {!!... !!} 輸出 html 時?我讀過的所有教程都只是使用 {{ Form::model(...) }} 的常規約定來打開表單.感謝您的任何建議!使用 Laravel 5 fwiw.

it works as expected. Do I always need to use the {!! ... !!} when outputting html? All the tutorials I've read up on just show using the normal convention of {{ Form::model(...) }} to open the form. Thanks for any advice! Using Laravel 5 fwiw.

推薦答案

正確.

{{ ... }} 用于原始 html
{{{ ... }}} 用于使用 htmlentities()

{{ ... }} for raw html
{{{ ... }}} for escaping with htmlentities()

<代碼>{!!... !!} 用于原始 html
{{{ ... }}} 用于顯式轉義的內容
{{ ... }} 用于默認行為(也被轉義)

{!! ... !!} for raw html
{{{ ... }}} for explicitly escaped content
{{ ... }} for the default behavior (which is escaped as well)

如果您不喜歡它,您可以使用以下方法更改所有 3 個標簽:

If you don't like it you can change all 3 of those tags with these methods:

Blade::setRawTags($openTag, $closeTag);
Blade::setContentTags($openTag, $closeTag);
Blade::setEscapedContentTags($openTag, $closeTag);

要恢復 Laravel 4 處理事物的方式,您可以這樣做:

To restore the way how Laravel 4 handled things, you can do this:

Blade::setRawTags('{{', '}}');
Blade::setEscapedContentTags('{{{', '}}}');

這篇關于Laravel 5 Form::model(...) 默認轉義?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Laravel Eloquent Union query(Laravel Eloquent Union 查詢)
Overwrite laravel 5 helper function(覆蓋 Laravel 5 輔助函數)
laravel querybuilder how to use like in wherein function(laravel querybuilder 如何在 where 函數中使用 like)
The Response content must be a string or object implementing __toString(), quot;booleanquot; given after move to psql(響應內容必須是實現 __toString()、“boolean和“boolean的字符串或對象.移動到 psql 后給出) - IT屋-程
Roles with laravel 5, how to allow only admin access to some root(Laravel 5 的角色,如何只允許管理員訪問某些根)
Laravel Auth - use md5 instead of the integrated Hash::make()(Laravel Auth - 使用 md5 而不是集成的 Hash::make())
主站蜘蛛池模板: 亚洲精品永久免费 | 性天堂网| caoporn免费在线视频 | 欧美激情精品久久久久 | 一区二区在线不卡 | 国产亚洲成av人在线观看导航 | 蜜臀av日日欢夜夜爽一区 | 天天操夜夜操 | 久久首页 | 情侣酒店偷拍一区二区在线播放 | 97av视频在线| 成人久久18免费网站麻豆 | h在线免费观看 | 黄色网一级片 | 国产成人一区二区 | 亚洲午夜av久久乱码 | 蜜桃av鲁一鲁一鲁一鲁 | 在线免费国产 | 久久久99国产精品免费 | 久久国产精品一区二区三区 | 国产精品久久久久久久久久久久久久 | av看看| 日韩在线视频一区二区三区 | 中文字幕亚洲精品 | 国产日韩精品在线 | 免费观看一级特黄欧美大片 | 欧美高清性xxxxhd | 久久手机在线视频 | 精品欧美 | 又爽又黄axxx片免费观看 | 欧美一区视频在线 | 91电影 | 午夜一区二区三区在线观看 | 久久国产精品免费一区二区三区 | 在线中文视频 | 99久久婷婷 | 国产精品国产精品国产专区不片 | 精品九九九 | 亚洲欧美日韩久久 | 男女污污网站 | av黄色片在线观看 |