You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "*" for root (and property) class names consists only of lowercase a-z and '-' characters.
when php-mf2 discovers a class beginning with h- that is not a valid name according to this specification, it still parses the element as if it were a microformat root, but does set "type": [], which I assume will crash quite a few consuming applications that expect type[0] to always exist.
Good catch. Instead of filling in the type in these examples, I think it shouldn't parse anything, since they're not valid root class names. That character restriction was added to avoid parsing from mixed-case helper classes like h-SomeFormatting I was pretty sure that was working, but looks like I've introduced a regression somewhere. Edit: Looks like I was only testing it on property elements, not root elements.
http://microformats.org/wiki/microformats-2-parsing says:
when php-mf2 discovers a class beginning with
h-
that is not a valid name according to this specification, it still parses the element as if it were a microformat root, but does set"type": []
, which I assume will crash quite a few consuming applications that expect type[0] to always exist.I initially discovered it with this typo:
which parses as
Other examples include
class="h-👍"
,class="h-hentry_"
orclass="h-"
The text was updated successfully, but these errors were encountered: