mf2py icon indicating copy to clipboard operation
mf2py copied to clipboard

implied, nested backcompat parsing does not use backcompat rules (e.g. hcard geo)

Open sknebel opened this issue 7 years ago • 0 comments

(based on https://github.com/microformats/php-mf2/issues/195)

With this test, when the geo property is backcompat parsed as p-geo h-geo, the parser is incorrectly adding an implied p-name for the h-geo. The u-url also shows the object is parsed as mf2, not mf1.

Simplified HTML:

<div class="vcard">
  <div class="fn">John Doe</div>
  <div>Location: <abbr class="geo" title="30.267991;-97.739568"><a class="u-url" href="https://brighton.co.uk">Brighton</a></abbr></div>
</div>

parsed:

{
   "type": [
    "h-card"
   ], 
   "properties": {
    "name": [
     "John Doe"
    ], 
    "geo": [
     {
      "type": [
       "h-geo"
      ], 
      "properties": {
       "url": [
        "https://brighton.co.uk"
       ], 
       "name": [
        "30.267991;-97.739568"
       ]
      }, 
      "value": "30.267991;-97.739568"
     }
    ]
   }

sknebel avatar Aug 10 '18 18:08 sknebel