That function looks interessting:
Code: Select all
function rss_utf8_decode($string) {
if (strtolower(LANG_CHARSET) != 'utf-8') { # shouldnt this be ==
return utf8_decode($string);
} else {
return $string;
}
}
Xhtml 1.0 valid
To make this thingy Xhtml valid i needet to change the link encoding:
Find those Lines(they dont appear as pasted):
Code: Select all
$content .= '<a href="' . $this->rss_utf8_decode($item['link']) . '" target="'.$target.'">';
to
$content .= '<a href="' . htmlentities($this->rss_utf8_decode($item['link'])) . '" target="'.$target.'">';
$content .= '• <a href="' . $url . '" target="' . $target . '" title="' . $text . '">' . htmlspecialchars($text) . "</a>";
to
$content .= '• <a href="' . htmlentities($url) . '" target="' . $target . '" title="' . $text . '">' . htmlspecialchars($text) . "</a>";
$content .= '• <a href="' . htmlentities($url) . '" target="' . $target . '" title="' . $text . '">' . $text . "</a>";
to
$content .= '• <a href="' .$url . '" target="' . $target . '" title="' . $text . '">' . $text . "</a>";
bbcode:
To make the Htmlcode Xhtml 1.0 valid i had to change some linebreaks:
Code: Select all
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\*(?::\w+)?\](.*?)(?=(?:\s*<br\s*\/?>\s*)?\[\*|(?:\s*<br\s*\/?>\s*)?\[\/?list)/si' => "\n<li class=\"bb-listitem\">\\1</li>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list(:(?!u|o)\w+)?\](?:<br\s*\/?>)?/si' => "\n</ul>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list:u(:\w+)?\](?:<br\s*\/?>)?/si' => "\n</ul>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list:o(:\w+)?\](?:<br\s*\/?>)?/si' => "\n</ol>",
Code: Select all
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\*(?::\w+)?\](.*?)(?=(?:\s*<br\s*\/?>\s*)?\[\*|(?:\s*<br\s*\/?>\s*)?\[\/?list)/si' => "<li class=\"bb-listitem\">\\1</li>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list(:(?!u|o)\w+)?\](?:<br\s*\/?>)?/si' => "</ul>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list:u(:\w+)?\](?:<br\s*\/?>)?/si' => "</ul>",
'/(?<!\\\\)(?:\s*<br\s*\/?>\s*)?\[\/list:o(:\w+)?\](?:<br\s*\/?>)?/si' => "</ol>",