> For the complete documentation index, see [llms.txt](https://liseen315.gitbook.io/laravel/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liseen315.gitbook.io/laravel/shou-ji-he-chu-li-yong-hu-shu-ju/versus.md).

# {{ 与 {!!

任何时候在web页面显示的内容都是用户创建的。你需要注意避免恶性输入，例如脚本注入。

例如，用户在你的网站上写Blog，你应该不想他们可以注入恶意的javascript到访客的浏览器里对么？所以你需要转义用户输入来避免这种情况。

幸好，Laravel帮我们做了这些。如果你使用Laravel的Blade模板引擎，默认的"echo"语法({{ $stuffToEcho}}) 会自动通过htmlentities()输出(PHP的安全输出)，使用{!! $stuffToEcho !!} 语法避免转义输出
