Page 3 of 3

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Jun 03, 2010 2:23 am
by wrp103
I am still interested in learning the "proper" way to fix this problem, but I needed a work-around. What I did was entered HTML tags with double square brackets instead of angle brackets, and then replaced them with the correct tags.

For example:

[[p]]This is a paragraph[[/p]]

Then, in my view, I added this code:

<?php
$textin = $this->greeting;
$search = array("[[","]]");
$replace = array("<",">");
$textout = str_replace($search,$replace,$textin);
echo $textout;
?>

Which then produced:
<p>This is a paragraph</p>

Not the best solution, but at least I can now work on the actual content instead of banging my head against a wall. ;^)

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Jun 03, 2010 2:54 am
by aravindha
Were you able to check if that code works when you put in <form action> as well???

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Jun 03, 2010 3:02 am
by wrp103
I'm not using forms at this point. Basically, I have a series of articles, where each article contains links to one or more other articles.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Jun 03, 2010 3:14 am
by aravindha
Okay, thank you. I will try it out and get back as soon as I'm done. If you have any updates/ work arounds apart from these, do post here. Thank you very much.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Jun 07, 2010 10:27 pm
by swimman13
And for some reason, this just began happening on one of my sites as well, with no changes to any TinyMCE settings. After posting some 2,000 events in jEvents using the editor without any issue, now all of a sudden the form elements for our custom buttons are being stripped out. Same thing happens in JCE as well, even though all clean up options are turned off, and have been from the beginning. Even when you select no editor, it still gets stripped out. I was using 1.5.15 and have recently upgraded to 1.5.18 thinking that might help. No such luck.

- Richard

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Jul 27, 2010 4:16 pm
by netefficacy
Just thought I would add to this thread the following.

I have a custom component, Joomla 1.5.8. In the admin backend, I have a page with two instances of TinyMCE. When clicking the save button, my save method in the model was stripping the HTML from the textareas in the form POST data. The solution is to add JREQUEST_ALLOWHTML to the request method call in the save method in the model. For example:

$data = JRequest::get( 'post', JREQUEST_ALLOWHTML);

From: http://forum.joomla.org/viewtopic.php?f=476&t=200940

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Wed Jul 28, 2010 1:32 am
by aehanson
This has been a long running problem but I do not see a solution... I am running V1.5.19, using JCE 1.5.7.4 and trying to insert code to enable a Picasa slide show from Google. Here is what I insert:

<embed type="application/x-shockwave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf" width="288" height="192" flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2FDgsWebAdmin%2Falbumid%2F5497629192116224033%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>

And here is what it looks like after I save it:

<object width="288" height="192"> <param name="src" value="http://picasaweb.google.com/s/c/bin/slideshow.swf" /> <param name="contenteditable" value="inherit" /><embed type="application/x-shockwave-flash" width="288" height="192" src="http://picasaweb.google.com/s/c/bin/sli ... d></object>

I have tried altering the filters and other settings to no avail... help!

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Dec 06, 2010 9:17 pm
by hnmxport
I know this sounds like beating a dead horse. I have tried for hours to keep Joomla 1.5.22 from stripping the actin parameter in my paypal button.

I have changed the filter options for the article to blacklist all except super administrator and i have gone to JCE 1.5.7.6 ->control panel->configurations and set the Cleanup HTML to no
and still get the same results. All of the links that you(very very helpful) people have posted all say to do this. Can some one think of something i am missing.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Dec 06, 2010 10:08 pm
by dhuelsmann
Did you go into JCE and change the group manager parameters to allow html? And into configuration in JCE to turn off html cleanup? And In Components/JCE Administration/Configuration there is an iframe which is set to no - if you want to use iframes then set it to yes.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Dec 07, 2010 3:08 pm
by hnmxport
@ dhuelsmann you are a Joomla GOD thanks much. Did not see an option for allowing HTML in group -> edit parameters tab but i did however turn on PHP, javascript, css and XHTML( maybe thats what did the trick) anyhow it works and really appreciate it.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Wed Jan 26, 2011 8:48 am
by mdrobiul
I'm also developing a custom admin component and when admin can enter html code. But html codes are striping automatically. How can I stop it?

I did not find any jfilter input in the mentioned location.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Sun Apr 03, 2011 2:58 am
by Kubo64
I hope this helps someone out there....I also beat my brains trying to get Tiny editor to stop stripping html... I tried everything posted in this forum also...trust me....I did some twice even! I finally decided to try a different editor and IT WORKED. I downloaded CK_Editor, (which is very nice, by the way), and it loaded my html instantly. I was trying to get my Site Lock badge image on my site and just couldn't do it, until I used CK_Editor.

Although it may sound like it....I'm not a spokes person for CK_Editor, lol, I just thought I'd share this piece of info with you all.

I am using Joomla 1.6

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Jul 07, 2011 2:34 am
by darbunderscore
Joomla 1.6.4 w/ Community Builder 1.4
I am wondering if anyone has solved the problem with the <form action> tag being stripped from within Community Builder only?
I am trying to put code for the users' paypal button on their CB Profile page using a text editor field. Even when setting my text editor to none, this code is getting stripped out. Specifically, the only part getting stripped out is the action="url" part of

Code: Select all

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
To clarify even more I can add the code to an article in Joomla, it is only in the CB component where the code is being stripped.
I've tried to add everything I can think of to the "Do not filter following tags on editor area fields:" field in CB configuration, User Profiles tab.
I've searched this and the CB forums and even posted to their forums and no love.
Any help would prevent me from knocking down this brick wall with my head. :eek: Thanks!!

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Wed Jul 20, 2011 9:30 pm
by bufontenator
I'm now in Joomla 1.7 and was having the same problem. I installed JCE editor hoping that it would fix the problem. No luck. So I disabled the TineyMCE plugin all together and it worked. No more HTML stripping.
You can disable the plugin by going to extensions > Plugin Manager > Editor - TinyMCE > set to disabled.
It seems that even though you set a different editor as "default" it still uses settings from Tiny MCE.
Let me know if this fixes it for other people.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Aug 08, 2011 2:42 am
by 34Bears
I am using JCE too and I turned off TinyMCE and it is still striping the html. I am using Microsoft Expressions 4 to build the html and then copy, paste my custom tables. My plug in attributes are correct so I don't know what the problem is.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Aug 08, 2011 3:25 am
by 34Bears
hnmxport wrote:@ dhuelsmann you are a Joomla GOD thanks much. Did not see an option for allowing HTML in group -> edit parameters tab but i did however turn on PHP, javascript, css and XHTML( maybe thats what did the trick) anyhow it works and really appreciate it.

I tried this too. No luck!

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Fri Aug 19, 2011 6:30 pm
by beneberle
If there are any 1.6/1.7 component developers out there who stumble upon this thread as I did and are trying to prevent HTML from being stripped in their component's WYSIWYG editor, have a look here:

http://stackoverflow.com/questions/5782 ... -save-html

In short, you need to add filter="safehtml" to the field declaration

<field name="description" type="editor" height="250" label="Description" filter="safehtml"
description="More Info" buttons="true" />

Hope this proves useful to someone.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Sun Oct 09, 2011 12:19 am
by manos_mei
JOOMLA 1.7
K2
JCE EDITOR 2.0.15

K2 > Items > Parameters > Content > Content Cleanup > Introtext HTML Cleaanup... set to "NO".

It works fine for me. Hope being useful :)

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Nov 08, 2011 9:38 pm
by johnnybgoodwin
OK, so #1, I can't believe this issue keeps coming up again and again.... I was in a 1.7.0 site and set tiny mce to extended, no code clean up, allow iframes and scripts, etc. Anything I could see. Still strips html instantly on save.
Next with no editor, same.
Next updated to 1.7.2. Same results.
Tried JCE for the editor. Same.
tried the Codemirror editor - same.
Finally, since this is a one off edit to add mail chimp newsletter archive into an article, I just went and added thecode in mysql.
This is not a serious option, is it? For most people, or frequent use?
As for this:

"http://stackoverflow.com/questions/5782 ... -save-html

In short, you need to add filter="safehtml" to the field declaration

<field name="description" type="editor" height="250" label="Description" filter="safehtml"
description="More Info" buttons="true" />"

I appreciate when anyone tries to help, but I don't understand it!!!
There's got to be a general solution that anyone can use for this - please!

John

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Fri Nov 11, 2011 2:43 pm
by denvarel
I have the same problem.
On joomla 1.7.2 with a jxtc template. I have a jxtc wallmodule with code straight from template jumpstart in it. When i repalced a text message from it, at save, i get a very nice, completely cleaned, code. I have tried everything, deactivate all editors, set tinymce in various ways, nothing. I cannot put any css straight in the module.
I replicate the jumpstart on another server where i tried just the plain 'save' command after i opened the module. I get clean code also as a result.
I need a solution to be able to put divs in that module.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Nov 14, 2011 3:22 am
by natewlew
I also have the same problem on 1.7.2. I have disabled everything:

My Profile> Editor - None
Global Configuration> Editor - None
Plugins > Editor - TinyMCE (disabled)

When I add code to the article and save it, it changes it in a strange way:

Code: Select all

<pre xml:php>
Gets changed to:

Code: Select all

<pre />
The closing Pre tag and everything after it gets changed to:

Code: Select all

</pre>
My only option is to use phpmyadmin to edit the articles.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Nov 29, 2011 6:46 pm
by webguydesigns
The Issue in Joomlas filters

Joomla! 1.5

See this article - http://docs.joomla.org/Why_does_some_HT ... n_1.5.8%3F

Joomla! 1.7

1. In the Joomla! Article Manager, click on the Options button
2. In the Options Dialog, click on the Text Filters tab.
3. For the Super Users group, or any other trusted user group, set Filter Type to No Filtering. Make sure that you only set this option for user groups that can be trusted as setting the Filter Type to No Filtering will essentially allow the user to include any html in an article.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Dec 06, 2011 12:24 pm
by denvarel
webguydesigns wrote:The Issue in Joomlas filters

Joomla! 1.5

See this article - http://docs.joomla.org/Why_does_some_HT ... n_1.5.8%3F

Joomla! 1.7

1. In the Joomla! Article Manager, click on the Options button
2. In the Options Dialog, click on the Text Filters tab.
3. For the Super Users group, or any other trusted user group, set Filter Type to No Filtering. Make sure that you only set this option for user groups that can be trusted as setting the Filter Type to No Filtering will essentially allow the user to include any html in an article.
I tried, that also. No luck! Stripping is still there . I cannot put html in module because every time i press "save" i lose formatting.
I have tried with tinymce inactive, editor none, editor jce, editor codemirror, nothing worked. Need advice asap

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Thu Dec 08, 2011 11:03 am
by simonron
In order to stop javascript, iframe, php code etc being stripped out - you have to do everything mentioned in this thread. Yes, everything - or at least check them. Any one of the above can and will strip contents - which is a very useful thing to have happen - as long as you know how to control it.

The final step for me ( after having found and done everything else ) is a result of a new aspect of Joomla 1.7 - at least for me. The Article Manager - options - text filter facility.
As this is part and parcel of the complex but very handy ACL system I am not surprised so many people have taken so long to find it.
It will be quite a task to fine tune this filtering system to your own requirements - but for me, enabling NO FILTERING on SuperAdmin is all I need for now. The Black Filter option kills everything no matter what editor you are using - even No Editor ! - that is what gave it away to me - and the posting just above this one MANY thanks for that :-)

This also allows the media manager from JCE to post Vimeo and [youtube] content - which was otherwise stripped despite all other settings being perfect.

Two days' work lost looking for that one.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Wed Dec 21, 2011 8:57 pm
by jfelisco
Hi there,

I have one solution. take a look with this link. It works for me.

http://docs.joomla.org/Why_does_some_HT ... n_1.5.8%3F

Good luck
Thanks,
Justin

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Sun Jan 22, 2012 10:19 pm
by tropikana99
add the tag that is getting stripped to the Extended Valid Elements field under Basic Options in TinyMCE and that stops it from stripping the action attribute from the form tag in the article editor or custom html modules.

I added "action" to the field after setting the filter under article options for Super User, and that took care of the problem.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Feb 28, 2012 6:31 pm
by sirchipmonk
Hi all, this thread seems to have been going for some time but I hope someone out there can answer this:

i am using Breezing Forms in Joomla 1.7

Somehow the action url is being stripped from my code so the form does nothing but refresh the page.

I am not using a code editor to enter the code and I assumed Breezing forms and Joomla would work cooperatively to allow a form submission without stripping my bloody action url??

I have had success before in allowing code to be input into the joomla editors but these settings do not seem to solve the issue with Breezing Forms.

action url still being stripped.

Anyone?

Thanks

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Tue Mar 27, 2012 4:26 pm
by bufontenator
I GOT IT!
A while ago I posted that I had a solution, it worked on one site, but not in others. So, like all of you, went looking again for a solution and I found it.
There is an extension called Sourcerer that will let you place code anywhere on the site and the html cleaner won't touch it. I've used it on several sites and it works like a charm.
http://extensions.joomla.org/extensions ... ZXIiO30%3D
Enjoy!

I am not affiliated in any way with the extension posted in this reply.

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon May 28, 2012 6:29 pm
by Jarod545
bufontenator wrote:I GOT IT!
A while ago I posted that I had a solution, it worked on one site, but not in others. So, like all of you, went looking again for a solution and I found it.
There is an extension called Sourcerer that will let you place code anywhere on the site and the html cleaner won't touch it. I've used it on several sites and it works like a charm.
http://extensions.joomla.org/extensions ... ZXIiO30%3D
Enjoy!

I am not affiliated in any way with the extension posted in this reply.

i used too in one of my sites and works great for me

Re: How to stop Joomla from stripping HTML tags from form in

Posted: Mon Apr 15, 2013 1:43 pm
by da8iwr
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: