laravel 模板页如何输出htmlspecialchars_decode()转义后文本

来源:互联网 发布:python 伯乐在线 编辑:程序博客网 时间:2024/06/01 07:19

本来在php后台对这个转义文本做处理:

foreach($opins['data']['lists'] as $key=>$val){            $opins['data']['lists'][$key]['content']=htmlspecialchars_decode($val['content'],ENT_QUOTES);//            $opins['data']['lists'][$key]['content']=('<a href="">111</a>');        }

模板页直接输出:{{ $content}}
没想到这样不行。html还是没有解析:
必须:
模板页<?php echo $content?>


纯文本截取字符串显示省略号:


$newcombination[$key]['newOpinion']=mb_substr($val['newOpinion'],0,36,'UTF-8');$newcombination[$key]['newOpinion']=$newcombination[$key]['newOpinion'].'...';


原创粉丝点击