Joomla 3 can't add <script> to article
Asked Answered
H

5

8

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.

Heidy answered 10/11, 2014 at 8:53 Comment(0)
S
9

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

Stancil answered 16/9, 2015 at 9:29 Comment(1)
A bit late to the party, but you don't have to change the default editor for everyone - you can change it only for you, through the Users interface. Reduces risk of another user messing anything up.Ng
A
4

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
Applesauce answered 10/11, 2014 at 23:29 Comment(3)
Not quite understand how you fixed this, can you please explain me better. Thanks.Heidy
Updated answer to clarify.Applesauce
Hi @DanielMurphy. What if I want to probihit applet, how do I go about it. I am on Joomla 3.6 and in the prohibited elements field I have just applet but somehow scripts are stripped off. How can I solve the problem?Quadrillion
B
4

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

Bazar answered 14/1, 2015 at 14:25 Comment(0)
D
3

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

Disjoined answered 26/8, 2016 at 20:5 Comment(0)
R
0

i think you have to use jce editor

https://www.joomlacontenteditor.net/

which is allow you to add all tag .

May be Help

Thanks

Resistless answered 12/11, 2014 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.