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

h-food is sent as a malformed Microformats2 entry #16

Open
jesterpm opened this issue Sep 12, 2020 · 0 comments
Open

h-food is sent as a malformed Microformats2 entry #16

jesterpm opened this issue Sep 12, 2020 · 0 comments

Comments

@jesterpm
Copy link

I was using Teacup to check if my Micropub endpoint was implemented correctly and I think I found a bug in Teacup.

According to the Micropub spec, "all values MUST be specified as arrays". Based on examples later in the spec, I expect this applies to nested Microformats objects as well.

Teacup is sending the name property in the nested h-food object as a single value, which causes a parsing failure if parsed strictly according to the spec.

Sample:

{
  "type": [
    "h-entry"
  ],
  "properties": {
    "published": [
      "2020-09-11T21:15:12-07:00"
    ],
    "created": [
      "2020-09-11T21:15:12-07:00"
    ],
    "summary": [
      "Just drank: Tea"
    ],
    "drank": [
      {
        "type": [
          "h-food"
        ],
        "properties": {
          "name": "Tea"
        }
      }
    ]
  }
}
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

No branches or pull requests

1 participant