Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sknebel opened this issue Aug 10, 2018 · 0 comments · May be fixed by #220
Open

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

sknebel opened this issue Aug 10, 2018 · 0 comments · May be fixed by #220

Comments

@sknebel
Copy link
Member

sknebel commented Aug 10, 2018

(based on microformats/php-mf2#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 added a commit to sknebel-forks/mf2py that referenced this issue Oct 1, 2018
Changes the implied roots to mf1 root to properly cause nested backcompat parsing.
In cases where property == mf1 root name, no class for it is added.
@sknebel sknebel added the bug label Oct 1, 2018
@angelogladding angelogladding removed the bug label Dec 8, 2023
@angelogladding angelogladding linked a pull request Dec 11, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants