-
Notifications
You must be signed in to change notification settings - Fork 38
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
"Empty" h-cite gets name property? #267
Comments
Hi @janboddez! This is part of the implied parsing rules. If there's no explicit We could definitely consider restricting that further, though I'm not sure how offhand (would need to consider other unintended consequences). That would be a discussion for the parsing specification issues, though. |
Aah, thanks for confirming! I think I'll just leave things as they are, for now; there shouldn't be too many mf2 consumers that actually display an I'm all for further restricting, haha. 😅 Seems somewhat counterintuitive, given that "so much" (i.e., how an entry is interpreted/displayed) depends on the absence of a name property, to "so badly want to fill in the blanks" when there isn't one to begin with. What I've done in some of my projects, when parsing others' markup, is first check for microformats. When there's none, I'll use something like a |
I'm not sure if this is in a spec someplace, but I was surprised to see, for example, ...
... get parsed into:
(Obviously, the post I'm replying to is not titled "In reply to, etc." If it was, well, I'd have added a
p-name
in there somewhere. Still, could be just me missing something obvious here.)But then at the same time, something like this ...
... does not get a
name
property at all:Looks like a
name
(equal to the h-cite's text value) gets auto-added when there isn't an explicitp-name
or similar. (If there is, then thep-name
's value is used, as expected.)Except, this does not happen when a
h-card
(or something likee-content
) is present. (Yet it does happen when only au-url
is present.)So, uh, I was wondering if this is by design.
On my own sites, I've always used markup very close to the examples above. When replying to or reposting a note (without an explicit title), I leave out the
p-name
.I do occasionally but not always add
p-author h-card
. Looks like when I do, all is well (noname
gets set, as intended), but when I don't,php-mf2
suddenly does add that ("non-sensical")name
property.Only way around it would be to use a
u-in-reply-to
directly on the URL in question (and skip the h-cite altogether). Which would be OK, I guess (there's not much of a reply context without, well, any actual reply context), except I'd have to rewrite quite some posts (and logic). 😅Either way, I'd love to find out ... I mean, and it would also be super convenient if I could somehow keep using the same type of markup. The examples aren't so different, after all.
The text was updated successfully, but these errors were encountered: