TinyMCE,IE9,剥离< script>标签 [英] TinyMCE, IE9, stripping <script> tags

查看:119
本文介绍了TinyMCE,IE9,剥离< script>标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

晚上好,第一个问题在这里!

Good evening, first question here!

我看了,我看了,我找到了无效的解决方案。我的问题是IE9(以及8,7等)将在TinyMCE 3.4.3.2中删除标签。

I've looked and I've looked, and I've found solutions that don't work. My problem is that IE9 (and 8, 7 etc) will strip tags in TinyMCE 3.4.3.2.

我担心我的情况有点独特:我是使用现有的CMS(自定义),这是一个有点过时,用Java制作,并不是XHTML友好的。有一个自定义插件允许您插入一些脚本代码,然后用 CDATA 标签包围它。基本上:

I'm afraid my circumstances are a little unique: I'm working with an existing CMS (custom) which is a little outdated, made in Java, and isn't XHTML-friendly. There is a custom plugin that allows you to insert some script code, then surrounds it with CDATA tags. Essentially:

insertHTML(document.videoForm.myobj.value);

其中insertHTML将光标插入到光标所在的位置。现在,这在Chrome,Firefox等中非常有效,但在IE中失败了。通过popup textarea框插入脚本后,使用TinyMCE的内置HTML查看器,< script> 标签消失。在脚本标记之前放置< br /> 会使其工作由于某种原因,但这是不可取的,因为许多客户端不知道HTML是什么。

Where insertHTML, well, inserts it where the cursor was. Now, this works fantastically in Chrome, Firefox etc, but fails in IE. After inserting the script via a popup textarea box, then using TinyMCE's built in HTML viewer, the <script> tags disappear. Putting a <br /> before the script tags makes it work for some reason, but this is undesirable as many clients don't know what HTML is.

使用IE9的开发人员......我发现了一些错误。

HTML1114:代码页unicode(UNICODE字节顺序标记) )覆盖冲突的代码页windows-1252(11)

由doctype触发

<!DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Frameset // ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd>

错误,我知道,我想要更改它,但我在这里受到非常严格的限制,而且我无法访问该doctype的呈现位置。

Using IE9's developer...thing...I found some errors.
HTML1114: Codepage unicode from (UNICODE byte order mark) overrides conflicting codepage windows-1252 from (11)
Triggered by the doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd">
WHICH IS WRONG, I KNOW, and I want to change it, but I am under quite strict limitations here, and I don't have access to wherever that doctype is rendered.

另一件事:这里是extended_valid_elements thingymajig:

Another thing: here is the extended_valid_elements thingymajig:

extended_valid_elements: "SCRIPT[language<JavaScript?JavaScript1.1?JavaScript1.2?JScript?php?VBScript|src|wgtsrc|type<text/javascript?mce-text/javascript?javascript],script[language<JavaScript?JavaScript1.1?JavaScript1.2?JScript?php?VBScript|src|wgtsrc|type<text/javascript?mce-text/javascript?javascript],form[name|method|action|id|target|onsubmit],FORM[name|method|action|id|onclick|target|onsubmit],embed[src|type|wmode|width|height],object[class|id|classid|codebase|width|height]"

如果你能发现任何可能导致IE掉线的东西,请指出它。如果你能告诉我那个奇怪的doctype正在抛弃它,请告诉我,我会问我的雇主他埋葬了哪个......

If you can spot anything in there that could throw IE off, do point it out. If you can tell me that the strange doctype is throwing it off, let me know and I'll ask my employer where he buried that...

TL ; DR: IE9剥离了TinyMCE 3.4.3.2中的标签,可能是由于doctype。

TL;DR: IE9 strips tags in TinyMCE 3.4.3.2, possibly due to doctype.

推荐答案

我认为这是与此问题相关:
为何选择HTML1113 :从IE9标准到怪癖的文档模式重启

I think this is related to this SO question: Why HTML1113: Document mode restart from IE9 Standards to Quirks

查看那里的解决方案。

这篇关于TinyMCE,IE9,剥离&lt; script&gt;标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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