Skip to content

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

@jesterpm

Description

@jesterpm

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"
        }
      }
    ]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions