鍍金池/ 問(wèn)答/PHP/ smarty 轉(zhuǎn)義問(wèn)題 沒(méi)有解析<p>標(biāo)簽,直接把<p>

smarty 轉(zhuǎn)義問(wèn)題 沒(méi)有解析<p>標(biāo)簽,直接把<p>標(biāo)簽輸出了,用unescape 報(bào)錯(cuò) ?

內(nèi)容編輯器用的 ueditor,
數(shù)據(jù)庫(kù)里保存的是帶p標(biāo)簽的,類似于 <p>12312</p><p>1221</p>
讀內(nèi)容到頁(yè)面顯示的時(shí)候 smarty并沒(méi)有自動(dòng)解析p標(biāo)簽顯示的還是數(shù)據(jù)庫(kù)里保存的內(nèi)容。
<{$arr.content|escape:'htmlentitydecode'}> 不管用

unescape 報(bào)錯(cuò) Fatal error: Smarty error: [in article_detail.tpl line 93]: [plugin] modifier 'unescape' is not implemented (core.load_plugins.php, line 235) in E:worktestsrcincludeSmartySmarty.class.php on line 2175

數(shù)據(jù)庫(kù)保存的內(nèi)容格式
圖片描述

頁(yè)面顯示
圖片描述

這方法無(wú)效
圖片描述

unescape 報(bào)錯(cuò)
圖片描述

本人小白,請(qǐng)大神們指點(diǎn)一二

回答
編輯回答
亮瞎她

strip_tags

2018年2月19日 09:59
編輯回答
有你在

試試htmlspecialchars_decode

2017年1月15日 22:17
編輯回答
何蘇葉

頁(yè)面顯示p標(biāo)簽,查看源碼的時(shí)候發(fā)現(xiàn)被轉(zhuǎn)義了,
由于smarty的unescape不能用,所以用了js的轉(zhuǎn)義圖片描述

成功了

2017年1月29日 17:34