Skip Menu |

This queue is for tickets about the HTML-Truncate CPAN distribution.

Report information
The Basics
Id: 20308
Status: resolved
Priority: 0/
Queue: HTML-Truncate

People
Owner: ashley [...] cpan.org
Requestors: KEVINR [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] Add a 'repair' option to fix unclosed HTML tags
Date: Wed, 5 Jul 2006 18:54:27 -0400
To: bug-html-truncate [...] rt.cpan.org
From: kevinr [...] bestpractical.com (Kevin Riggle)
I've patched HTML::Truncate to add a 'repair' option (with getter/setter, perldoc, and tests), which closes unclosed HTML tags. HTML::Truncate actually already performed this behavior somewhat, but it would only repair tags at the end of the input (eg. '<b>foobar' became '<b>foobar</b>'). This patch allows HTML::Truncate to repair tags in the middle of its input. It takes unmatched open tags and closes them as late as possible (so '<b><i>foobar</b> baz' becomes '<b><i>foobar</i></b> baz'), and it drops unmatched close tags (so 'foo</i>bar' becomes 'foobar'). - Kevin -- Kevin Riggle <kevinr@bestpractical.com> Best Practical Solutions, LLC

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #20308] AutoReply: [PATCH] Add a 'repair' option to fix unclosed HTML tags
Date: Wed, 5 Jul 2006 19:00:18 -0400
To: Bugs in HTML-Truncate via RT <bug-HTML-Truncate [...] rt.cpan.org>
From: kevinr [...] bestpractical.com (Kevin Riggle)
On Wed, Jul 05, 2006 at 06:54:34PM -0400, Kevin Riggle wrote: Show quoted text
> I've patched HTML::Truncate to add a 'repair' option (with > getter/setter, perldoc, and tests), which closes unclosed HTML tags.
Attached is a revised version of the patch. I left a spurious debug message in the original one I sent. - Kevin -- Kevin Riggle <kevinr@bestpractical.com> Best Practical Solutions, LLC

Message body is not shown because sender requested not to inline it.

From: Ashley
On Wed Jul 05 19:00:21 2006, KEVINR wrote: Show quoted text
> On Wed, Jul 05, 2006 at 06:54:34PM -0400, Kevin Riggle wrote:
> > I've patched HTML::Truncate to add a 'repair' option (with > > getter/setter, perldoc, and tests), which closes unclosed HTML tags.
> > Attached is a revised version of the patch. I left a spurious debug > message in the original one I sent. > > - Kevin
Okay, it was easier than I thought; assuming I didn't miss anything, which is, after all, a pretty big assumption. Updated version is uploaded and should roll over soon. Thank you very much. I really appreciate it.
Sorry to be so slow in closing this ticket. The patch was applied long ago.