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

dt-parsing seems to try to interpret value (breaking it in some cases) #149

Closed
sknebel opened this issue Mar 13, 2018 · 2 comments
Closed

Comments

@sknebel
Copy link
Member

sknebel commented Mar 13, 2018

Regression from last release to master
Example site: https://aaronparecki.com/, which has

<div class="h-card">
<time class="dt-bday" datetime="--12-28"></time> 
</div>

output:

{
   "type": ["h-entry"],
   "properties": {
                "bday": ["--12-2800"],
            }
 }

expected output: "bday": ["--12-28"]

This looks like php-mf2 tries to parse the date, instead of simply passing through the value it finds in the datetime=property.

@gRegorLove
Copy link
Member

Thanks for catching that! It's incorrectly interpreting "-28" as a TZ offset and normalizing it. I'll work on a fix.

@sknebel
Copy link
Member Author

sknebel commented Mar 13, 2018

It should not interpret anything from a non-VCP datetime. There's been suggestions to always do some dt parsing instead of only for VCP and to produce a more normalized format, but (from what I know) no clear proposed spec changes, so right now arguably anything that produces not exactly the input string is kind of a bug. Is there some documentation what php-mf2 tries to do here?

gRegorLove added a commit to gRegorLove/php-mf2 that referenced this issue Mar 13, 2018
aaronpk added a commit that referenced this issue Mar 13, 2018
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

2 participants