我在我的cakephp v1.3应用程序中使用了 wmd-editor 。
我写的配置如下:
wmd_options = {
output: "HTML",
lineLength: 40,
buttons: "bold italic | link blockquote code image | ol ul heading hr",
autostart: true
};
当我提交表单时,启用 wmd 的 textarea 中的 HTML 保存在数据库中,并对文本进行了处理,然后使用方法自动htmlentities()
对其进行解码。
但文本显示为包括这样的 HTML 编码html_entity_decode()
<p><strong>hello dear friends</strong></p>\n\n<pre><code>I want to make sure that everything that you type is visible clearly.\nadasfafas\n</code></pre>\n\n<blockquote>\n <p>sadgsagasdgxcbxcbxc</p>\n</blockquote>\n\n<p><em>sadfgsgasdsgasgs</em></p>\n\n<p><b><a href="http://kumu.in">this is the link</a></b></p>
请帮我解决这个问题
谢谢