Thread:Project:Support desk/Parser removing valid HTML from the output of extension

I am trying to format the html that this extension below is writing. But for some weird reason, the parser keeps removing the closing  tag even though the html does not have any bugs.

Is there a way to tell the parser to stop trying to sanitize the html output? It is rendering the html invalid. To me this looks like a bug.

MediaWiki 	1.16.0 PHP 	5.2.14 (cgi) MySQL 	5.1.48

Here is the code: the closing  after the at the end of the while statement is getting chopped off.

forumID|Number of post|Background Color * * @version 0.2 marcolino7 * * 0.2 - Added Path for the Icon *              Disabled Caching * 0.1 - Initial Release * * http://www.mediawiki.org/wiki/Extension:PHPBB_ShowForum */ if( !defined( 'MEDIAWIKI' ) ) { echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" ); die( -1 ); } // Extension credits that will show up on Special:Version $wgExtensionCredits['parserhook']['PHPBB_ShowForum'] = array(       'name'         => 'PHPBB Show Forum',        'version'      => '0.2',        'author'       => 'marcolino7, ',        'description'  => 'Link to Show PHPBB Forum in MediaWiki',        'url'          => '' ); $wgExtensionFunctions[] = "wfPHPBBExtension"; function wfPHPBBExtension { global $wgParser; $wgParser->setHook( "phpbb_forum", "showForum" ); } function showForum( $input, $argv, &$parser) { $phpbbDBSERVER="localhost"; $phpbbDBUSER="DBUser"; $phpbbDBUSERPW="DBPassword"; $phpbbDBNAME="DBname"; $phpbbDBPrefix="phpbb_"; $phpbb_home = " "; $phpbb_icon_path = "templates/subSilver/images/folder.gif"; #        //Disabling Cache $parser->disableCache; //Split input in 2 Parameters list($forumID, $topicID, $postLimit) = split('[|.-]', $input); $link = mysql_connect($phpbbDBSERVER,$phpbbDBUSER ,$phpbbDBUSERPW); if ( !$link ) { return " Error while connecting to host \"$phpbbDBSERVER\" ! "; } $db_selected = mysql_select_db($phpbbDBNAME, $link); if (!$db_selected) {return " Error while selecting database \"$phpbbDBNAME\" ! "; } $sql = "SELECT p.post_subject, p.post_text, p.topic_id, p.post_id, p.post_time, p.forum_id,               p.post_username, u.username as user, u.user_id as id, u.user_avatar as avatar, u.user_avatar_width as width, u.user_avatar_height as height                        FROM                 ". $phpbbDBPrefix  ."posts AS p,                ". $phpbbDBPrefix ."users AS u                        WHERE p.topic_id in ( $topicID )                        AND p.poster_id = u.user_id                        AND p.forum_id in ( $forumID )                        ORDER BY p.post_id DESC                         LIMIT 0, $postLimit"; $qryres = mysql_query($sql); if (!$qryres) { return " Error while MySQL Query :". mysql_error ;} $out = " Comments "; $row_count = 0; //Cycle inside recordset and populate page while ($row = mysql_fetch_row($qryres)) {                       $out = $out. "   ".$row[7]." says: <a href=\"".$phpbb_home."viewtopic.php?f=$forumID&t=".$row[2]."#".$row[3]."\">".$row[0]."</a> ".date("D, d M Y H:i",$row[4])." <div class=\"comment-body\">".$row[1]." </li> "; } //End While $out = $out. "</ol> Post a Comment "; mysql_free_result($qryres); return $out; } ?>