[uf-discuss] value-title feedback

Ben Ward lists at ben-ward.co.uk
Sat Oct 10 20:39:11 PDT 2009


Hi Martin,

Thanks for the feedback. Is this a new build of Tidy, do you know?  
Certainly, it did get tested (although we were always aware putting a  
space in was a workaround.)

On 10 Oct 2009, at 20:19, Martin McEvoy wrote:

> <span class='value-title'>&nbsp;</span>
>
> which seems a little unintuitive to me. ....hmm?

The further problem with that is that the non-breaking space will  
render, thus exposing the data in the tooltip.

Uuuugh.

My view is bluntly that we should abandon emphasis on the ‘space’  
hack. It's really there more for authors with CMS whose content gets  
proxied through HTMLTidy before publication. Parsers really need to  
deal with it parse the element in all circumstances.

Plausible solutions:

1. Ages I wrote a patch for HTMLTidy that fixes the dropping behavior  
and does not drop empty elements that also have class attributes. With  
that you can build tidy without the dropping. The obvious question:  
For your parser, is it feasible to link to a bundled version of tidy  
rather than the system version?

The diff to patch Tidy is here: <http://gist.github.com/207380> (or a  
compiled version of Tidy with this patch applied can be downloaded  
form here: <http://ben-ward.co.uk/files/tidy-microformats.zip>

2. Alternatively, can you use a different HTML parser? Perhaps the  
native HTML DOM parsing function in PHP, or HTML5lib in Python and  
Ruby? <http://code.google.com/p/html5lib/>.

I'm keen to update the value-class-pattern documentation to make this  
less fuzzy. Will await further feedback here, though.

Cheers,

Ben


More information about the microformats-discuss mailing list