<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>HTML Truncated Due To Unmatched Div Tag</title>
        <description>Why does it truncate everything after&amp;lt;/div&amp;gt;?



Test1&amp;lt;/div&amp;gt;
&amp;lt;table&amp;gt;
	&amp;lt;tr&amp;gt;
		&amp;lt;td&amp;gt;
			Test2
		&amp;lt;/td&amp;gt;
	&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;


Any other tag unbalanced does not do this, just div. Why is that? How can I make it not do this?</description>
        <link>http://htmlpurifier.org/phorum/read.php?3,6253,6253#msg-6253</link>
        <lastBuildDate>Tue, 18 Jun 2013 02:39:41 -0400</lastBuildDate>
        <generator>Phorum 5.2.18</generator>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6260#msg-6260</guid>
            <title>Re: HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6260#msg-6260</link>
            <description><![CDATA[<p>For now, I've fixed it like this:</p>

<pre>
	/**
	 * @static
	 * @param string $sHTML
	 * @return string
	 */
	public static function getHTMLWithFixForUnmatchedDivTags($sHTML){

		$iOpeningDivCount  = preg_match_all('/&lt;div/', $sHTML, $aMatches);
		$iClosingDivCount  = preg_match_all('/&lt;\/div&gt;/', $sHTML, $aMatches);
		$sExtraOpeningDivs = null;

		if($iClosingDivCount &gt; $iOpeningDivCount)
			for($i = 1; $i &lt;= ($iClosingDivCount - $iOpeningDivCount); $i++)
				$sExtraOpeningDivs .= "&lt;div&gt;";

		return $sExtraOpeningDivs.$sHTML;

	}
</pre>]]></description>
            <dc:creator>laurin1</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 13 Mar 2012 12:16:29 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6258#msg-6258</guid>
            <title>Re: HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6258#msg-6258</link>
            <description><![CDATA[<p>Tried to post a reply, but can't:</p>

<p><a href="http://htmlpurifier.org/phorum/read.php?3,6257">http://htmlpurifier.org/phorum/read.php?3,6257</a></p>]]></description>
            <dc:creator>laurin1</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 13 Mar 2012 12:04:22 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6256#msg-6256</guid>
            <title>Re: HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6256#msg-6256</link>
            <description><![CDATA[<p>We don't have a bug tracker; so forums are usually the best place.</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 13 Mar 2012 12:00:37 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6255#msg-6255</guid>
            <title>Re: HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6255#msg-6255</link>
            <description><![CDATA[<p>Is there a bug reporting tool or a place to vote for bugs or give feedback?</p>]]></description>
            <dc:creator>laurin1</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 13 Mar 2012 11:08:53 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6254#msg-6254</guid>
            <title>Re: HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6254#msg-6254</link>
            <description><![CDATA[<p>Yeah, known bug. A bit annoying. Use <a href="/live/configdoc/plain.html#Core.LexerImpl">%Core.LexerImpl</a> set to DirectLex to avoid it (but take a performance hit and some parsing behavior changes!).</p>]]></description>
            <dc:creator>Ambush Commander</dc:creator>
            <category>Support</category>
            <pubDate>Tue, 13 Mar 2012 00:50:56 -0400</pubDate>
        </item>
        <item>
            <guid>http://htmlpurifier.org/phorum/read.php?3,6253,6253#msg-6253</guid>
            <title>HTML Truncated Due To Unmatched Div Tag</title>
            <link>http://htmlpurifier.org/phorum/read.php?3,6253,6253#msg-6253</link>
            <description><![CDATA[<p>Why does it truncate everything after&lt;/div&gt;?</p>

<pre>

Test1&lt;/div&gt;
&lt;table&gt;
	&lt;tr&gt;
		&lt;td&gt;
			Test2
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
</pre>

<p>Any other tag unbalanced does not do this, just div. Why is that? How can I make it not do this?</p>]]></description>
            <dc:creator>laurin1</dc:creator>
            <category>Support</category>
            <pubDate>Mon, 12 Mar 2012 21:55:45 -0400</pubDate>
        </item>
    </channel>
</rss>
