Joomla 3 can't add <script> to article

こ雲淡風輕ζ 提交于 2019-11-30 04:47:57

问题


Joomla version: Joomla! 3.3.6 Stable [ Ember ] 01-October-2014 02:00 GMT

I want add js script to one my article. I'm using TinyMCE editor to edit article.

In TinyMCE plugin field Prohibited Elements I filled with dummy text, now it contains "cms123", I removed "script,applet,iframe".

I checked Global Configurations -> Text Filters for Super Users I have set it "No Filtering".

But when I'm trying to save my article with js code, joomla removes my tags <script> from my article, also I checked with <iframe>, joomla replaced this tag with <i-frame> tag... I'm really confused, I can't understand what is wrong.

Can anybody help me?

Thanks.


回答1:


Actually, i spent 4 hrs to find out this issue and got solution now. just login to administrator then go to System-->Global configuration, under that you will see "Site Settings", in that you will find-out "Default Editor", select as "Editor - CodeMirror" and save it. after that go to articles, then add your script. Enjoy :)




回答2:


I just came across this problem today and I confirm the same problem. I could not remove the "script" prohibited elements but I was able to remove everything else. I then tried just putting a period in the Prohibited Elements input box, saved and I now can use script tags. I frames work too. I'm using 3.3.6. Strange.

  1. Global Configurations -> Text Filters for Super Users - set it "No Filtering"
  2. Users -> User Manager - Make sure you have Super User privileges
  3. Extensions -> Plugin Manager -> Filter:Editors -> TnyMCE -In the TinyMCE plugin field, add a period in the "Prohibited Elements" field



回答3:


I've spent quite a while getting to bottom of this - even after installing JCE editor the problem persisted. It turned out that another security component RSFirewall was running inthe background stripping out prohibited elements.

The solution therefore is to add an exception in the RSFirewall firewall configuration: https://www.rsjoomla.com/support/documentation/view-article/785-scrambled-tags-iframe-becomes-i-frame.html




回答4:


Got the same issue. I'm using 3.6.2. Here are how I get it works:

  1. Global Configurations -> Text Filters for Super Users - set it "No Filtering"
  2. Users -> User Manager - Make sure you have Super User privileges
  3. Extensions -> Plugin Manager -> Filter:Editors -> TnyMCE -In the TinyMCE plugin field, remove "script" in the "Prohibited Elements" field
  4. In "Extended Valid Elements", add "script"

And I'm able to add script tags in the article now.




回答5:


i think you have to use jce editor

https://www.joomlacontenteditor.net/

which is allow you to add all tag .

May be Help

Thanks



来源:https://stackoverflow.com/questions/26839930/joomla-3-cant-add-script-to-article

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