带有 html 标签的文本打印从 ckeditor 保存到数据库

text print with html tags saved from ckeditor to database

我在 laravel 中使用 CK 编辑器插件,它将所有带有 HTML 标签的文本保存在数据库中,但是当我在视图中打印它时,它打印带有 HTML 标签

 {{$company_detail->company_description}}

这保存在数据库文本字段中

<p><strong>Leverage agile frameworks to provide a robust synopsis for high-level overviews. Iterative approaches to corporate strategy foster </strong>collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment. Capitalize on low hanging fruit to identify a ballpark value added activity to beta test.</p>

在我看来它打印出来的样子

谢谢

您需要使用以下方式删除视图文件中的 HTML 标记:

{!! $company_detail->company_description !!}

strip_tags($company_detail->company_description);
echo strip_tags($company_detail['company_description']);