We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There are a few cases where the parser is returning incorrect results because of the way it tests for the presence of attributes.
http://pin13.net/mf2/?id=20170524175046008
<article class="h-entry"> <a class="u-url">link</a> </article>
currently parses as
{ "type": [ "h-entry" ], "properties": { "url": [ "http://example.com/" ], "name": [ "link" ] } }
The correct result should have the url property set to link.
link
This is caused by this incorrect conditional check: $u->getAttribute('href') !== null
$u->getAttribute('href') !== null
The getAttribute method will never return null according to the PHP docs: http://php.net/manual/en/domelement.getattribute.php
getAttribute
The code should instead be testing for the presence of the attribute with hasAttribute
hasAttribute
The text was updated successfully, but these errors were encountered:
5940ed3
Merge pull request #119 from aaronpk/issue-118
26e4ed4
Fixes for elements with missing attributes (#118)
No branches or pull requests
There are a few cases where the parser is returning incorrect results because of the way it tests for the presence of attributes.
http://pin13.net/mf2/?id=20170524175046008
currently parses as
The correct result should have the url property set to
link
.This is caused by this incorrect conditional check:
$u->getAttribute('href') !== null
The
getAttribute
method will never return null according to the PHP docs: http://php.net/manual/en/domelement.getattribute.phpThe code should instead be testing for the presence of the attribute with
hasAttribute
The text was updated successfully, but these errors were encountered: