mosGetParam and editorArea html filtered out?

For Joomla! 1.0 Coding related discussions.
Locked
roba121
Joomla! Explorer
Joomla! Explorer
Posts: 465
Joined: Tue Jun 13, 2006 12:20 pm

mosGetParam and editorArea html filtered out?

Post by roba121 » Sat Jul 28, 2007 4:25 pm

I continue to have a problem with this and have not figured out how to tackle it.

I have a component in the backend with an editor area. When I pass the value to save the data

i use

$message=mosGetParam($_REQUEST,'message');

all the html gets filtered out. Which doesnt work very well. 

If I do  a regular $_POST or $_REQUEST['message'] it works fine obviously.

I tried

$message=mosGetParam($_REQUEST,'message','',1);

without luck, What am I missing?

I took that from

function mosGetParam( &$arr, $name, $def=null, $mask=0 )

in joomla.php on line 2927

Any help is always appreciated.

Thanks

Rob

User avatar
jonascw
Joomla! Explorer
Joomla! Explorer
Posts: 367
Joined: Fri Dec 29, 2006 12:09 pm
Location: Norway
Contact:

Re: mosGetParam and editorArea html filtered out?

Post by jonascw » Thu Aug 02, 2007 4:26 pm

Hi

Have you tried widt the $mask?
$mask
    is an optional parameter containing one or more of the following flags:

    _MOS_ALLOWHTML
        Do not strip HTML tags from the data.
http://help.joomla.org/content/view/516/155/

roba121
Joomla! Explorer
Joomla! Explorer
Posts: 465
Joined: Tue Jun 13, 2006 12:20 pm

Re: mosGetParam and editorArea html filtered out?

Post by roba121 » Thu Aug 02, 2007 4:28 pm

Yep and it didnt work, Thought it was weird too.

Rob

User avatar
jlleblanc
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Fri Aug 19, 2005 12:37 am
Location: Washington, DC / NoVA
Contact:

Re: mosGetParam and editorArea html filtered out?

Post by jlleblanc » Thu Aug 02, 2007 6:46 pm

Does your HTML work in the content component? It could be that the editor you're using is filtering out the HTML before it even gets to Joomla!.
Joseph L. LeBlanc: http://www.jlleblanc.com
Frontend components start here: /components/com_[name]/[name].php
Backend components start here: /administrator/components/com_[name]/admin.[name].php

roba121
Joomla! Explorer
Joomla! Explorer
Posts: 465
Joined: Tue Jun 13, 2006 12:20 pm

Re: mosGetParam and editorArea html filtered out?

Post by roba121 » Thu Aug 02, 2007 7:56 pm

Yes, as I said before If I save the data as just $_REQUEST['name'] then I get the html, the editor is not doing anything.  I'm going to try on another install but I wont get to it till the morning probably.

Thanks

Rob

User avatar
Segolas
Joomla! Intern
Joomla! Intern
Posts: 66
Joined: Wed Oct 10, 2007 2:34 pm

Re: mosGetParam and editorArea html filtered out?

Post by Segolas » Thu Nov 08, 2007 4:17 pm

I found the error. "_MOS_ALLOWHTML" is the 4th parameter of mosGetParam function. So the right way to use it should be:

Code: Select all

mosGetParam( $_POST, 'message',"", _MOS_ALLOWHTML)
Visita il mio blog a FUMETTI:
http://segolas.ilcannocchiale.it


Locked

Return to “Joomla! 1.0 Coding”