Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 ckeditor 来管理富文本。我需要在这个字段中进行搜索,但是例如,带有奇怪字符的单词以 html 格式保存。例如,在我的首页这是 BD 中的单词 'està' 保存为 'està',它们,搜索永远不会匹配。
一些建议?,我正在考虑使用 html2text 功能将 html-text 转换为纯文本。
感谢您的回答。
如果您想将内容保存为 unicode 而不是使用 HTML 实体,请将其设置为您的配置
config.removePlugins = 'entities'; config.entities = false;
我这样做是因为我需要 100% 的 XML 兼容性并且到目前为止它运行良好,但我还删除了聪明的用户粘贴到编辑器中的某些破坏 XML 的字符。