Jinput is filtering the formatted text from text area...

112 views
Skip to first unread message

fornandakishore

unread,
Mar 3, 2014, 4:23:24 AM3/3/14
to joomla-de...@googlegroups.com
Hello Guys,

 I have a problem with JInput ... its working fine with J3+ version but it not working properly in J2.5 versions.

I have a textarea where I can format my text and will submit data to store that formatted text.

$jInput = JFactory::getApplication()->input;

$data ['mess'] = $jInput->get( 'mess', '', 'RAW' ); 

This is working fine in J3+ but the above and below one;s are not working under J2.5

$data ['mess'] = JRequest::getVar( 'mess', '', 'post', 'string', 'JREQUEST_ALLOWRAW' );
$data ['mess'] = JRequest::getVar( 'mess', '', 'post', 'string', 'JREQUEST_ALLOWHTML' );

only this is working in J2.5

$data['mess'] = $_POST[ 'mess'];

what is the correct way to retrieve the formatted text from text area ?

Thanks in Advance..


Regards 
Nanda K.
PHP / Joomla Freelance Developer
Sr. Developer at Hudda Infotech

M: +91-9849971144

Please pardon any typos or brevity.

Michael Babker

unread,
Mar 3, 2014, 2:10:55 PM3/3/14
to joomla-de...@googlegroups.com
JInput was missing the ability to do a RAW filter in 2.5 for reasons I can't remember currently.

Also, in your JRequest calls, the JREQUEST constants shouldn't have quotes around them.  That may be affecting your outcome.


--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To post to this group, send an email to joomla-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-general.
For more options, visit https://groups.google.com/groups/opt_out.

fornandakishore

unread,
Mar 3, 2014, 11:10:23 PM3/3/14
to joomla-de...@googlegroups.com
Hi Michel,

Thanks for your reply, I have already tried with quotes and also without quotes but there is no changes while retrieving the data. Any alternative ways and I am still searing for the solution.


Regards 
Nanda K.
PHP / Joomla Freelance Developer
Sr. Developer at Hudda Infotech

M: +91-9849971144

Please pardon any typos or brevity.



Reply all
Reply to author
Forward
0 new messages