如何防止CKEditor和> (大于/小于) [英] How to prevent CKEditor from stripping < and > (greater-than/less-than)

查看:304
本文介绍了如何防止CKEditor和> (大于/小于)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次在CKEditor窗口中输入< > ,保存,然后返回它,CKEditor用括号内的任何内容和随附的结束标签替换它们。例如:
如果我输入<配置细节> ,CKEditor会假定它是一个HTML标签并放置< configuration details& < / configuration detail> ,从而从文本中完全剥离它。 Argh!

Every time I enter < or > in a CKEditor window, save, and then come back to it, CKEditor replaces them with whatever was typed within the brackets and the accompanying end tag. For example: if I type <configuration details>, CKEditor will assume it is an HTML tag and put <configuration details></configuration details> in the html source, thus stripping it out altogether from the text. Argh!

任何想法?

推荐答案

提出的是使用一个unicode字符,这是一个模糊的小于sign-ish,或者一些功能上的回忆,例如,一个左箭头可以表示重定向。

The best I've come up with is to use a unicode character which is vaguely less-than-sign-ish, or something functionally reminiscent, for instance, a left arrow could indicate redirection.

您需要有一个初始页面/记事本类型的字符打开,所以你可以剪切和粘贴(或查找/替换)工作在你的救生文件。

You'll need to have a scratch page / notepad kind of thing with your characters open, so you can cut and paste (or Find/Replace) as you're working on your life-saving docs.

以下是我填写的几个符号:

Here are a few symbols I've gotten to fill in:

⨞◀◄◄ ►▶▷❭˃

根据浏览器,操作系统和/或应用程序unicode支持和(mis)配置,任何这些都可能工作或不工作。

Any of these may or may not work depending on browser, OS and/or application unicode support and (mis)configuration.

复制和google-search以查找unicode / html /长说明(例如,'MODIFIER LETTER RIGHT ARROWHEAD'(U + 02C3)),并使用该信息查找相关或匹配的符号。

Copy and google-search to find unicode/html/long-description (e.g.,'MODIFIER LETTER RIGHT ARROWHEAD' (U+02C3)) for any character, and use that info to find related or matching symbols.

这里有几个例子。您需要一个适当的浏览器和3D眼镜才能完全欣赏。

Here are a couple of examples. You'll need a proper browser and 3D glasses to appreciate them fully.


  • 这看起来不错!

mysql -u root -p xxxxxx❮/usr/share/icinga2/schema.sql


  • 不是这么多,但它是一个很好的谈话开始者:

配置详情►


  • 也许甚至

mysql -u root -p passw * t◄nerf_ischemia.sql

但哇,这是可怕的。

这里有一个更好的符号,甚至有一些黑客入侵一个图像。但这是我的快速解决。
在任何情况下,这个解决方案的适用性将取决于各种因素,包括字符集不精确性的容差以及前面提到的操作系统,软件,浏览器奇怪的unicode字符支持。

There may be a better symbol out there, or even some hack with infixing an image. But that's my quick fix. In any case, the applicability of this solution is going to depend on various factors including tolerance for character-set imprecision as well as the previously-mentioned OS, software, browser weird-unicode-character support.

这篇关于如何防止CKEditor和&gt; (大于/小于)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆