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

Laravel 5 Form::model(...) 默認(rèn)轉(zhuǎn)義?

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

問題描述

也許這是我遺漏的一件簡單的事情,但在我的 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() }}

這會產(chǎn)生轉(zhuǎn)義的 HTML,因此表單標(biāo)簽實際上會打印到屏幕上.但是,如果我這樣做:

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() !!}

它按預(yù)期工作.我是否總是需要使用 {!!... !!} 輸出 html 時?我讀過的所有教程都只是使用 {{ Form::model(...) }} 的常規(guī)約定來打開表單.感謝您的任何建議!使用 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
{{{ ... }}} 用于顯式轉(zhuǎn)義的內(nèi)容
{{ ... }} 用于默認(rèn)行為(也被轉(zhuǎn)義)

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

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

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);

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

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

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

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

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

相關(guān)文檔推薦

Laravel Eloquent Union query(Laravel Eloquent Union 查詢)
Overwrite laravel 5 helper function(覆蓋 Laravel 5 輔助函數(shù))
laravel querybuilder how to use like in wherein function(laravel querybuilder 如何在 where 函數(shù)中使用 like)
The Response content must be a string or object implementing __toString(), quot;booleanquot; given after move to psql(響應(yīng)內(nèi)容必須是實現(xiàn) __toString()、“boolean和“boolean的字符串或?qū)ο?移動到 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())
主站蜘蛛池模板: www国产精品 | 一级毛片视频在线观看 | 欧美一区免费 | 黄网免费| 国产精品美女久久久免费 | 婷婷免费在线 | 亚洲人成人一区二区在线观看 | 综合色播 | www.xxxx欧美 | 欧美精品乱码久久久久久按摩 | 性一交一乱一透一a级 | 美女视频黄的免费 | 9porny九色视频自拍 | 成年人国产在线观看 | 老司机精品福利视频 | 亚洲精品日韩综合观看成人91 | 亚洲在线高清 | 久久综合久色欧美综合狠狠 | 国产一区二区三区久久久久久久久 | 成人毛片一区二区三区 | 国产剧情一区 | 国产精品日韩在线观看一区二区 | 黄色毛片大全 | 999久久久| 日韩久久中文字幕 | 91精品久久久久久久久久入口 | 国产精品乱码一区二区三区 | 久久久久免费精品国产小说色大师 | 人人爽日日躁夜夜躁尤物 | 久久精品一级 | 在线国产99 | 超级碰在线 | 精品不卡 | 欧美炮房 | 日本色综合| 特黄特黄a级毛片免费专区 av网站免费在线观看 | 免费在线观看av网站 | 中文字幕日韩一区 | 日韩精品成人一区二区三区视频 | 粉嫩一区二区三区性色av | 色婷婷av久久久久久久 |