Help with code stripping and Joomla and JCE

This forum is for general questions about extensions for Joomla! version 1.5.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
lividsnails
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 124
Joined: Mon Jan 07, 2008 4:46 pm

Re: Help with code stripping and Joomla and JCE

Post by lividsnails » Tue May 04, 2010 1:39 pm

I was able to resolve this issue by UN-enabling the code-cleanup plugin of JCE. It was that simple for me. None of the solutions above worked for me but this did. It's under JCE plugin manager.

ArtistDigital
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Thu Jun 10, 2010 5:28 am
Contact:

Re: Help with code stripping and Joomla and JCE

Post by ArtistDigital » Wed Jun 16, 2010 4:32 am

same problem! Thankx for posting it!

learwbc4
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Sep 14, 2006 8:55 pm
Location: Pompano Beach
Contact:

Re: Help with code stripping and Joomla and JCE

Post by learwbc4 » Fri Jul 23, 2010 5:03 pm

still nothing?

why do wysiwyg editors strip code and no-editor doesn't strip code?

and why does tinymce have 2 options: one to clean upon open and one to clean upon save, but jce only has one option (and that one option doesn't work)?

does anyone know if other editors have this problem? like wysiwyg pro, joomlack, ckeditor or others?

this issue has been going on for much too long.

learwbc4
Joomla! Apprentice
Joomla! Apprentice
Posts: 43
Joined: Thu Sep 14, 2006 8:55 pm
Location: Pompano Beach
Contact:

Re: Help with code stripping and Joomla and JCE

Post by learwbc4 » Fri Jul 23, 2010 6:32 pm

just tried joomlaCK editor and it doesn't strip javascript tags.
haven't tested flash object tags, but i don't see why that wouldn't work as well.

tatude
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Jul 14, 2010 1:34 am

Re: Help with code stripping and Joomla and JCE

Post by tatude » Wed Jul 28, 2010 5:21 pm

For those of you that are using JCE you may want to look at the top link here:

Stick with the JCE but check the JCE config.
- Cleanup HTML should be set to No

If that does not work, try this solution:
http://www.joomlacontenteditor.net/supp ... 2-javascri...

If that does not help, try this alternative
http://www.deal-times.com/Web-Dvelopmen ... -script-pl...

I was having issues with Javascript being removed from my articles - the top link shows that you have to manage your group settings in the JCE group admin area - there is a drop down in there for Java, PHP and CSS

Hope this helps

User avatar
39images
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 236
Joined: Wed Feb 24, 2010 6:31 am
Contact:

Re: Help with code stripping and Joomla and JCE

Post by 39images » Thu Sep 30, 2010 6:00 pm

tatude wrote:For those of you that are using JCE you may want to look at the top link here:

Stick with the JCE but check the JCE config.
- Cleanup HTML should be set to No

If that does not work, try this solution:
http://www.joomlacontenteditor.net/supp ... 2-javascri...

If that does not help, try this alternative
http://www.deal-times.com/Web-Dvelopmen ... -script-pl...

I was having issues with Javascript being removed from my articles - the top link shows that you have to manage your group settings in the JCE group admin area - there is a drop down in there for Java, PHP and CSS

Hope this helps
Thanks! The top method worked for me. I had to allow Javascript.

mbrunw
Joomla! Apprentice
Joomla! Apprentice
Posts: 28
Joined: Fri Aug 01, 2008 5:12 pm

Re: Help with code stripping and Joomla and JCE

Post by mbrunw » Thu Oct 14, 2010 1:21 am

I have been fighting with this problem as well. Switched to JCE because code from PayPal on two pages was getting changed so much it didn't work. The code was copy pasted from PayPal, and IF unchanged, worked fine. But, TinyMCE was re-writing it. It was solved with the extra controls in JCE until today when I edited a parameter on those pages. Almost lost my mind trying to figure it out. Then I watched it change the code even with everything turned "off". But, I couldn't believe what I discovered. One thing was causing the problem. I noticed one little bit of alt= text was getting deleted. Once I turned off all WYSIWYG editors and shortened the text in the alt it worked! Here's all I edited:
Original: alt="PayPal - The safer, easier way to pay online!"
New: alt="PayPal - The safer, easier way to pay!"

I can't imagine why that worked!! Maybe someone will be helped by this odd experience.

User avatar
bil7y
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Thu May 14, 2009 5:57 pm
Location: San Francisco, California
Contact:

Re: Help with code stripping and Joomla and JCE

Post by bil7y » Fri Oct 29, 2010 11:53 pm

This what worked for me. It was Filtering settings in teh Article Parameters
http://docs.joomla.org/Why_does_some_HT ... n_1.5.8%3F

Very frustrating issue so I will post this on a few threads.

aashishc
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Nov 12, 2010 8:10 pm

Re: Help with code stripping and Joomla and JCE

Post by aashishc » Fri Nov 12, 2010 8:15 pm

Ok this is how I solved it:

We built a website for a client, he could not copy paste [youtube] code into the 'edit code' tab in JCE editor, in the first round of troubleshooting, I did the same thing and I could paste the code and videos showed up.

I googled it, read all the threads, even installed AllVideo plugin, but that was not solving the problem, it was creating a new way to embed the videos, and more training to client on how to use it.

I was almost ready to connect to his PC with remote login, when it hit me..

I can insert the video and it works fine, when he does the code is stirred down, the only difference between his and my access: I'm the Super Admin. Bingo! I made him super admin as well and problem solved.. he can now easily embed videos.

It did solve it for me, however I could allow super admin access to the client, guess if you cannot allow super admin access to your users.. the rabbit hole goes deeper for that solution.

All the best ;D

Ash

User avatar
bil7y
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Thu May 14, 2009 5:57 pm
Location: San Francisco, California
Contact:

Re: Help with code stripping and Joomla and JCE

Post by bil7y » Fri Nov 12, 2010 8:56 pm

one more piece of the puzzle can be security plugins. Like the siteground Jhack plugin. Its a great plugin but it will strip some tags as it is configured out of the box. Disable it or paly with the settings to make it work as you would like.

Ozi
Joomla! Explorer
Joomla! Explorer
Posts: 323
Joined: Fri Sep 14, 2007 1:02 am
Location: Vancouver
Contact:

Re: Help with code stripping and Joomla and JCE

Post by Ozi » Thu Dec 02, 2010 8:08 am

I just had this problem and after viewing the forums over at JCE I found this post
http://www.joomlacontenteditor.net/foru ... ped#p35428

It helped 100%.

You basically need to download the 2 files they post and replace them on your server, then set in JCE Groups->Editor Parameters, set Allow IFrames to Yes
Cappymoo Media
http://www.cappymoo.com
Start your journey with us!

Ziks
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Apr 09, 2012 11:20 pm
Location: Milan
Contact:

Re: Help with code stripping and Joomla and JCE

Post by Ziks » Mon Apr 09, 2012 11:28 pm

Hello Everybody :)

i know that this is a very outdated topic, but none of the solutions that i found here helped me in solving the stripping html problem. It was driving me crazy: as i have just found the solution that fits for my website, i want to share it with you.

This solution applies to J 1.5.23 and JCE.

The problem is: embedding any code via the front end. The editor strips away any string beginning with < and ending with < or >.

In Joomla articles' configuration, i was selecting Blacklist filter and no group in filter groups: according to the description, this was supposed to work, as if you have no group selected, the blacklist filter shouldn't apply to anyone. But that's not the way...

You have to select

"filter groups" ---> JUST public level

"filter type" ---> blacklist

and there you go: you can write any code in your editor.

Bye!

makoto333
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jan 02, 2009 10:41 pm

Re: Help with code stripping and Joomla and JCE

Post by makoto333 » Thu Dec 06, 2012 10:53 pm

Had the same issue.
Read and followed all of the great responses - to no avail.
Got rid of jce. Tried a different editor.
Tried changing user groups, blacklisting, whitelisting, article parameters.

Nothing.

Finally figured out I had jhackguard installed.
If you have this, or a similar product to protect your site from sql injections, attacks, etc. you can turn off the plugin - put your code in - save it - then turn your protections back on.

Not sure if anyone else had a similar difficulty when all the other troubleshooting efforts failed, so wanted to share.

Thanks to everyone out there making Joomla so great!!!!!!!!!!

makoto333
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Jan 02, 2009 10:41 pm

Re: Help with code stripping and Joomla and JCE

Post by makoto333 » Thu Dec 06, 2012 10:54 pm

Had the same issue.
Read and followed all of the great responses - to no avail.
Got rid of jce. Tried a different editor.
Tried changing user groups, blacklisting, whitelisting, article parameters.

Nothing.

Finally figured out I had jhackguard installed.
If you have this, or a similar product to protect your site from sql injections, attacks, etc. you can turn off the plugin - put your code in - save it - then turn your protections back on.

Not sure if anyone else had a similar difficulty when all the other troubleshooting efforts failed, so wanted to share.

Thanks to everyone out there making Joomla so great!!!!!!!!!!

da8iwr
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 190
Joined: Sat Jan 14, 2006 1:59 pm
Location: Sunderland UK
Contact:

Re: Help with code stripping and Joomla and JCE

Post by da8iwr » Mon Apr 15, 2013 1:46 pm

In Joomla 1.5, 2.5 and 3.0 using JCE 154 up to the current version of 2.3 its the same way to allow this.

Go to
Components > JCE Editor > Editor Profiles > Default > Editor Parameters > Advanced

And then select "Yes" for
  • Allow Javascript
    Allow CSS
    Allow PHP
    XHTML Inline Scripts
Now you can enter [youtube] Video, flash, Facebook, Twitter, etc embed code :geek:

User avatar
Dan1980
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Wed Feb 01, 2012 11:03 pm

Re: Help with code stripping and Joomla and JCE

Post by Dan1980 » Fri Apr 26, 2013 3:37 am

Thank you to everyone who has maintained this thread, as it's a tricky one.

JCE forum assisted with this link that solved the problems for me in Joomla 2.5.

Turned out that RSFirewall was the culprit as it was disrupting starting tags for iframes and so on, in order to protect against Javascript injections. With No Editor it would disrupt the tag. With JCE or any other editor, it would either scramble or wipe the code on save.

Here's the details:
http://www.rsjoomla.com/support/documen ... frame.html

There are a few options for how to solve this. Probably best to simply Whitelist your own IP to create an ultimate exception for yourself (and anyone else) who need to use those features that RSFirewall is scrambling.

Hope this helps someone who has tried everything suggested in this thread, but none of which has worked.

Was at my wit's end, till we discovered that it was RSFirewall all along.

User avatar
BigJoeB
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Oct 29, 2009 1:41 pm

Re: Help with code stripping and Joomla and JCE

Post by BigJoeB » Sun Aug 11, 2013 11:17 pm

pmcnamara wrote:Joomla is still stripping the code..

whether its done in the default wyswyg editor, tinymce or jce..

all of them have the html stripped out.

damn frustrating.

Yep here we are in August 2013 and Joomla still has its head up it's...well nevermind.
Still stripping code in Joomla! 3.1.5 Stable [ Ember ] 01-August-2013 14:00 GMT

User avatar
BigJoeB
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Thu Oct 29, 2009 1:41 pm

Re: Help with code stripping and Joomla and JCE

Post by BigJoeB » Sun Aug 11, 2013 11:28 pm

da8iwr wrote:In Joomla 1.5, 2.5 and 3.0 using JCE 154 up to the current version of 2.3 its the same way to allow this.

Go to
Components > JCE Editor > Editor Profiles > Default > Editor Parameters > Advanced

And then select "Yes" for
  • Allow Javascript
    Allow CSS
    Allow PHP
    XHTML Inline Scripts
Now you can enter [youtube] Video, flash, Facebook, Twitter, etc embed code :geek:
Just breaks it in a different way , still does not work.

Enter this is code mode (JCE 2.3.3.2)

Code: Select all

<style>
.bicycle365-1 { width: 320px; height: 50px; }
@media(min-width: 500px) { .bicycle365-1 { width: 468px; height: 60px; } }
@media(min-width: 800px) { .bicycle365-1 { width: 728px; height: 90px; } }
</style>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Bicycle365-1 -->
<ins class="adsbygoogle bicycle365-1"
     style="display:inline-block"
     data-ad-client="ca-pub-0196865803122339"
     data-ad-slot="4219293195"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Save

Get this when you open it again.

Code: Select all

<p>
	<style type="text/css" scoped="scoped">
		<!-- .bicycle365-1 {
			width: 320px;
			height: 50px;
		}
		@media(min-width: 500px) {
			.bicycle365-1 {
				width: 468px;
				height: 60px;
			}
		}
		@media(min-width: 800px) {
			.bicycle365-1 {
				width: 728px;
				height: 90px;
			}
		}
		-->
	</style>
</p>
<script async="" src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" type="text/javascript"></script>
<!-- Bicycle365-1 -->
<p>&nbsp;</p>
<script type="text/javascript">
	// <![CDATA[
	(adsbygoogle = window.adsbygoogle || []).push({});
	// ]]>
	
</script>
Takes 14 lines and mangles it to 30

redzambala
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sat Feb 11, 2012 9:13 pm

Re: Help with code stripping and Joomla and JCE

Post by redzambala » Fri Sep 27, 2013 10:33 pm

The same problem here, with J! 3.1.5

jamarcus
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Sun Mar 31, 2013 12:19 pm

Re: Help with code stripping and Joomla and JCE

Post by jamarcus » Wed Jan 29, 2014 10:28 pm

I am having the same problem with Joomla 3.2. I'm working with the Twitter Tweet button and the script code keeps getting stripped out of the articles after each save. I have tried several things. First of all, I am a SuperUser. I have removed SCRIPT from the prohibited elements list in TinyMCE and added it to the valid elements. I have tried removing script from the blacklist in libraries > Joomla > filters >input.php. I have tried working in JCE editor and TinyMCE with the same results. After every save the script code disappears. HELP! Thank you!

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Help with code stripping and Joomla and JCE

Post by dpacadmin » Thu Jan 30, 2014 12:08 am

You can add script if you use no editor, select in the User Manger settings. You can also try adding an extension or plugin that allows scripts in articles.
http://archive.extensions.joomla.org/

bwakad
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Jan 29, 2014 11:08 pm

Re: Help with code stripping and Joomla and JCE

Post by bwakad » Thu Jan 30, 2014 12:46 am

The best solution I have found came from Gavick developer: use codemirror editor by going to: User Manager (click Super User), (click Basic Settings), at Editor choose CodeMirror.

It is basically a plain text editor that does NOT strip anything you put in there. I find it to be the best, and if you are installing and edit websites this is probably the most easy one to use!

User avatar
dpacadmin
Joomla! Champion
Joomla! Champion
Posts: 6029
Joined: Sat Aug 16, 2008 1:46 pm
Location: the Bat Cave
Contact:

Re: Help with code stripping and Joomla and JCE

Post by dpacadmin » Thu Jan 30, 2014 5:12 am

CodeMirror seems to be a plugin for the JCK editor;
http://www.joomlackeditor.com/downloads ... codemirror

I also tracked down this one for JCE, Sourcerer;
http://download.nonumber.nl/?ext=sourcerer&v=3.3.0

jamarcus
Joomla! Apprentice
Joomla! Apprentice
Posts: 32
Joined: Sun Mar 31, 2013 12:19 pm

Re: Help with code stripping and Joomla and JCE

Post by jamarcus » Sun Feb 02, 2014 1:59 pm

Thank you for your information and direction!


Locked

Return to “Extensions for Joomla! 1.5”