Page 1 of 1

how to get $_POST['text'] from editor without JREQUEST_ALLOW

Posted: Mon Feb 25, 2008 7:25 pm
by carsten888
(also in this new forum the subject line is just way too short)

how to get $_POST['text'] from editor without JJREQUEST_ALLOWRAW and still be able to split it up in 2 strings, before and after the hr

Code: Select all

<hr id="system-readmore" />
so far I got this, but it's not save with the raw-data and it shokes on a ' (singlequote).

Code: Select all

$content= JRequest::getVar('content','','post','string', JREQUEST_ALLOWRAW );				
					
				$length = strlen($content);
				$pos = strpos($content, '<hr id="system-readmore" />');
				if($pos){
					$pos2 = $pos + 27;		
					$introtext = addslashes(substr($content, 0, $pos));
					$fulltext = addslashes(substr($content, $pos2, $length));	
				}else{
					$introtext = $content;
					$fulltext = '';
				}
There must be an easyer way.

Anyone ?