vladimir
vladimir

Reputation: 705

Joomla 3 can't add <script> to article

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.

Upvotes: 8

Views: 14815

Answers (5)

tala9999
tala9999

Reputation: 1719

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.

enter image description here

Upvotes: 3

Shan Mugam
Shan Mugam

Reputation: 87

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 :)

Upvotes: 9

David
David

Reputation: 71

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

Upvotes: 4

Gopal Patel
Gopal Patel

Reputation: 1

i think you have to use jce editor

https://www.joomlacontenteditor.net/

which is allow you to add all tag .

May be Help

Thanks

Upvotes: 0

Daniel Murphy
Daniel Murphy

Reputation: 441

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

Upvotes: 4

Related Questions