bug

Denny Swindle <[email protected]> Thu, 2 Aug 2012 17:49:17 -0400
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <CADPoOpp6943ALH2T=EKm7eq9gV-euKorRMRBbmoQKOZnAi7kZg@mail.gmail.com>
Hi -

First off, is tidy being maintained anymore?  We use it heavily in
production and would love to see some updates.

Second - have a potential bug.  We're using the php module "Extension
Version" 2.0 ($Id$) (dated 14 June 2007).  We're running on php 5.3.15. Our
php code looks like:

$tidy = new \tidy();

$updated = $tidy->repairString($content,
        array(
            'bare' => true,
            'clean' => true,
            'drop-empty-paras' => true,
            'drop-font-tags' => true,
            'join-styles' => true,
            'word-2000' => true,
            'output-xhtml' => true,
            'wrap' => 0,
            'output-bom' => false,
            'show-body-only' => true,
            'drop-proprietary-attributes' => true
        ), 'UTF8');

When I pass the content in the attached file through repairString, it
crashes.  Would love some advice.
text.txt (text/plain, 7.4 KB)
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
	{font-family:Helvetica;
	panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
	{font-family:Helvetica;
	panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p
	{mso-style-priority:99;
	mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-priority:99;
	mso-style-link:"Balloon Text Char";
	margin:0in;
	margin-bottom:.0001pt;
	font-size:8.0pt;
	font-family:"Tahoma","sans-serif";}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:"Calibri","sans-serif";
	color:#1F497D;}
span.BalloonTextChar
	{mso-style-name:"Balloon Text Char";
	mso-style-priority:99;
	mso-style-link:"Balloon Text";
	font-family:"Tahoma","sans-serif";}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:8.5in 11.0in;
	margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for your &#8220;explanation.&#8221; I will contribute accordingly.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Ross Martin [mailto:[email protected]] <br><b>Sent:</b> Wednesday, August 01, 2012 11:12 AM<br><b>To:</b> [email protected]<br><b>Subject:</b> Re: [ActBlue] Other: Other<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div id=hsReplyAbove><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Hi Denise,<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Thanks for writing in! So various groups of course allocate their funds differently, but if you like, you can contribute directly to Mr. Obama by following this link: <a href="https://secure.actblue.com/contribute/entity/16332" target="_blank">https://secure.actblue.com/contribute/entity/16332</a>. We at ActBlue support Democratic candidates and organizations by providing an online fundraising platform. Please let me know if I can be of any further assistance!<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>All the best,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Ross<o:p></o:p></span></p></div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'><br><br>--<br>Ross Martin<o:p></o:p></span></p><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>Political Team<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>ActBlue<o:p></o:p></span></p></div><div><blockquote style='margin-left:0in;margin-top:5.0pt;margin-bottom:5.0pt'><p><strong><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>From:</span></strong><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'> <a href="mailto:[email protected]"><span style='color:#346CC4;text-decoration:none'>[email protected]</span></a><br><strong><span style='font-family:"Helvetica","sans-serif"'>Date:</span></strong> August 1, 2012 12:51:15 PM EDT <br><strong><span style='font-family:"Helvetica","sans-serif"'>To:</span></strong> Info Queue &lt;<a href="mailto:[email protected]"><span style='color:#346CC4;text-decoration:none'>[email protected]</span></a>&gt; <br><strong><span style='font-family:"Helvetica","sans-serif"'>Subject:</span></strong> Re: [ActBlue] Other: Other <o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN style='font-size:9.0pt;font-family:"Helvetica","sans-serif"'>First name: Denise<br>Last name: Harvey<br>Email: [email protected]<br>Subject text: Other<br>Message: I just made a contribution and will not make another unless I see evidence of participation in the campaign fund raising for President Obama. I'm already pissed off at the underwhelming support of progressives for his second term, making him vulnerable to defeat by Romney. If progressives haven't learned anything from past Republican campaigns that let them take the congress and the White House because they did not get fully involved they are either stupid or real stupid. Get out support for the President. <br>User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0.1<br><br>******************<br><br>No Indigo user with that email address found.<o:p></o:p></span></p></blockquote></div></div></div><p class=MsoNormal><span style='border:solid windowtext 1.0pt;padding:0in'><img border=0 width=100 height=100 id="Picture_x0020_1" src="cid:~WRD000.jpg" alt="Description: Image removed by sender."></span><span lang=EN style='font-size:1.0pt;color:white'>{#HS:1921243-8031#}</span><span lang=EN> <o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN>No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>Version: 2012.0.2197 / Virus Database: 2437/5169 - Release Date: 08/01/12<o:p></o:p></span></p></div><hr noshade="noshade" size="1"><a></a><p class=""avgcert"" align="left" color="#000000">No virus found in this message.<br>
Checked by AVG - <a href='http://www.avg.com'>www.avg.com</a><br>
Version: 2012.0.2197 / Virus Database: 2437/5170 - Release Date: 08/01/12</p></body></html>