php - 拉维尔 : when i return styled string from database its appear with the html tags

标签 php html css mysql laravel

我使用 ckeditor 在数据库中存储了一些带有 html 标签的文本,当我在 laravel blade 中打印文本时,文本显示为样式但标签与文本一起出现,请检查下面的过程。

这是存储在mysql数据库中的文本:

<h4>English</h4>

这是 Blade 中打印文本的 div 部分

 <div class="col-md-12">
       {{$post->title_ar}} 
 </div>

这是结果

<h3> English </h3> 

我希望文本显示时没有这样的标签:

English

最佳答案

如果您将语法从 {{ }} 更改为 {!! !!.

这也取决于你使用的是什么版本...

V-5 应该是:{!! !!

关于php - 拉维尔 : when i return styled string from database its appear with the html tags,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42752770/

相关文章:

php - 用PHP检查IE不好吗

html - 区分平板电脑和上网本的 CSS 媒体查询

php - 如何在 xdebug 模式下启用输出突出显示?

php - 安装 aimeos 时出现数据库错误 (Laravel 5.3)

php - 您如何在 MVC 的 PHP 页面之间传递值?

html - 如果请求和响应的 uri 相同,为什么 Microsoft edge 在调用 POST/REDIRECT/GET 方法时发送空的 http-referer?

javascript - 从 JavaScript 更改样式不保存

php - 为什么我的 CSS 没有按应有的方式更改?

java - "full-page"小程序的 HTML 代码(无 javascript)?

javascript - jQuery动画改变窗口大小