Tracker: Bugs

6 Don't trim empty elements with class attributes - ID: 1943512
Last Update: Comment added ( hoehrmann )

An empty element with a class attribute might still be needed for script or metadata (e.g. eRDF) purposes.

If a class attribute is present, don't trim the element.


Additional info:

Just eyeballing, it looks like a minor change to parser.c around line 287 would fix it.


Original:

if ( attrGetID(element) || attrGetNAME(element) )
return no;

Proposed:

if ( attrGetID(element) || attrGetNAME(element) || attrGetCLASS(element) )
return no;


but I will defer to someone who knows the code better.

mdubinko@yahoo.com


Nobody/Anonymous ( nobody ) - 2008-04-15 17:03:58 PDT

6

Open

None

Nobody/Anonymous

HTML/XHTML Parser

Current - all platforms

Public


Comments ( 2 )

Date: 2008-05-18 05:35:29 PDT
Sender: hoehrmannProject AdminAccepting Donations


I think this needs a configuration option (you may very well want to drop
them, e.g. when a generator generates many such elements automatically) and
it should probably be off by default. Then this would be a fine addition, I
take it the issue also just came up on
http://microformats.org/discuss/mail/microformats-dev/2008-May/000521.html


Date: 2008-04-22 03:42:10 PDT
Sender: arnaud02Project Admin


This is a reasonable request. A test case would have been nice.


Attached File

No Files Currently Attached

Change ( 1 )

Field Old Value Date By
priority 5 2008-04-22 03:42:10 PDT arnaud02