[uf-discuss] <br> in hCard parsing

Andy Mabbett andy at pigsonthewing.org.uk
Tue Jan 30 01:51:27 PST 2007

The hCard parsing page:



        Any occurrence of a <br /> inside the element(s) for a value
        must be treated as a carriage-return (\n) in the respective
        location in the value.

I think that, for some hCard properties, line-breaks should be ignored.
For instance, the correct way to write a UK postal address would be:

        1 Any Street,
        B99 1XY

but for the v- and hCard, the "locality" is "Edgbaston, Birmingham",
which might be marked up as:

        <span class="street-address">1 Any Street,</span><br>
        <span class="locality">Edgbaston,<br>
        <span class="postal-code">B99 1XY</span>

I contend that "<br>" should be rendered by hCard parsers as a single
space character, except in "free text" fields such as notes.

Would this cause problems anywhere?

Andy Mabbett

                        Welcome to the 27-day week!

More information about the microformats-discuss mailing list