-
Notifications
You must be signed in to change notification settings - Fork 6
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
Explicitly remove surrounding spaces in parsed u-*
values
#48
Comments
Same applies to (Originally published at: https://www.svenknebel.de/posts/2020/3/2/) |
Related discussion about what the mf2 spec means by "normalized": #9 I'm +1 for trimming the whitespace, though the spec change might need to be in the last bullet point ("return the normalized absolute URL...") to ensure it applies to all cases. |
+1 from me. I don't recall what the Go library does in this regard, but I'm happy to update it to match this spec change. |
+1 to @gRegorLove's note. I think the last bullet in the "parsing a
…and/or whitespace stripping is implied in the existing text? I'd rather we be explicit, though. |
There is currently an inconsistency in the PHP, Ruby and Python parsers regarding spaces in
u-*
values. The PHP and Ruby parsers will remove surrounding spaces from the value returned inu-*
properties, but the Python parser does not.Given this HTML:
PHP:
Ruby
Python
The HTML spec says:
Since the Microformats parser is trying to return a URL value, it seems like removing the spaces is the correct behavior, even though that is not currently in the Microformats spec, which just says:
http://microformats.org/wiki/microformats2-parsing#parsing_a_u-_property
I would like to propose a spec change to make it explicit that the parser should remove any surrounding spaces from the
href
attribute.The text was updated successfully, but these errors were encountered: