Has anyone run into Sitecore removing JavaScript from the page editor?

落爺英雄遲暮 提交于 2019-12-04 05:45:42
Martijn van der Put

Removing the script-tags in the RTE in Sitecore is standard behavior when the item is saved. However, in Sitecore 6.4.1 rev. 120113 and Sitecore 6.5 Update-4 there is a new property added in the web.config:

<setting name="HtmlEditor.RemoveScripts" value="true"/>

Setting this value to false should solve your problem. If you are using an older version of Sitecore, take a look at this blogpost which shows a workaround for older versions.

Are you adding this javascript in a Rich Text Editor?

I've seen the rich text editor strip out javascript as it saves. We have typically added javascript blocks in as a separate sublayout pulling from a multi-line text field and having it render out directly, rather than editing javascript through the rich text editor.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!