8
Not perfect but:
include_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'mainfile.php';
$xoopsLogger->activated = false;
$myts =& MyTextSanitizer::getInstance();
$content = $myts->stripSlashesGPC($_GET['text']);
$html = empty($_GET['html']) ? 0 : 1;
if (preg_match_all('/%u([[:alnum:]]{4})/', $content, $matches)) {
foreach ($matches[1] as $uniord) {
$utf = '&#x' . $uniord . ';';
$content = str_replace('%u' . $uniord, $utf, $content);
}
$content = urldecode($content);
}
$result = $myts->displayTarea($content, $html, 1, 1, 1, 1);
if (!$html) $result = $myts->undoHtmlSpecialChars($result);
echo "<div>" . $result . "</div>";