'.MyTextSanitizer::codeSanitizer('$1', 0).'
'";
//$text =& $this->xoopsCodeDecode($text, 0);
}
$text = preg_replace($patterns, $replacements, $text);
}
return $text;
}
function codeSanitizer($str, $image = 1){
if($image != 0){
$str = $this->xoopsCodeDecode(
$this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str)))
);
}else{
$str = $this->xoopsCodeDecode(
$this->htmlSpecialChars(str_replace('\"', '"', base64_decode($str))),0
);
}
return $str;
}
/**#@-*/
##################### Deprecated Methods ######################
/**#@+
* @deprecated
*/
function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
{
$text =& displayTarea($text, $allowhtml, $smiley, $bbcode, 1, 1);
return $text;
}
function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
{
$text =& previewTarea($text, $allowhtml, $smiley, $bbcode, 1, 1);
return $text;
}
function makeTboxData4Save($text)
{
//$text = $this->undoHtmlSpecialChars($text);
return $this->addSlashes($text);
}
function makeTboxData4Show($text, $smiley=0)
{
$text = $this->htmlSpecialChars($text);
return $text;
}
function makeTboxData4Edit($text)
{
return $this->htmlSpecialChars($text);
}
function makeTboxData4Preview($text, $smiley=0)
{
$text = $this->stripSlashesGPC($text);
$text = $this->htmlSpecialChars($text);
return $text;
}
function makeTboxData4PreviewInForm($text)
{
$text = $this->stripSlashesGPC($text);
return $this->htmlSpecialChars($text);
}
function makeTareaData4Save($text)
{
return $this->addSlashes($text);
}
function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
{
$ret = $this->displayTarea($text, $html, $smiley, $xcode);
return $ret;
}
function makeTareaData4Edit($text)
{
return $this->htmlSpecialChars($text);
}
function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
{
$ret = $this->previewTarea($text, $html, $smiley, $xcode);
return $ret;
}
function makeTareaData4PreviewInForm($text)
{
//if magic_quotes_gpc is on, do stipslashes
$text = $this->stripSlashesGPC($text);
return $this->htmlSpecialChars($text);
}
function makeTareaData4InsideQuotes($text)
{
return $this->htmlSpecialChars($text);
}
function &oopsStripSlashesGPC($text)
{
$ret = $this->stripSlashesGPC($text);
return $ret;
}
function &oopsStripSlashesRT($text)
{
if (get_magic_quotes_runtime()) {
$text =& stripslashes($text);
}
return $text;
}
function &oopsAddSlashes($text)
{
$ret = $this->addSlashes($text);
return $ret;
}
function &oopsHtmlSpecialChars($text)
{
$ret = $this->htmlSpecialChars($text);
return $ret;
}
function &oopsNl2Br($text)
{
$ret = $this->nl2br($text);
return $ret;
}
/**#@-*/
}
?>