Skip to content

Fix u- parsing for <video> with poster attribute #114

Closed
@gRegorLove

Description

@gRegorLove

video element's poster attribute should be used when parsing for u-, per http://microformats.org/wiki/microformats2-parsing##else+if+video

Isolated example from microformats test suite:

<div class="h-entry">
    <p class="p-name">microformats.org at 7</p>
    <video class="u-photo" poster="posterimage.jpg">
        Sorry, your browser doesn't support embedded videos.
    </video>
</div>

Expected result:

{
    "items": [{
        "type": ["h-entry"],
        "properties": {
            "name": ["microformats.org at 7"],
            "photo": ["posterimage.jpg"]
        }
    }],
    "rels": {},
    "rel-urls": {}
}

Test: https://github.com/microformats/tests/blob/master/tests/microformats-v2/h-entry/u-property.html
Expected: https://github.com/microformats/tests/blob/master/tests/microformats-v2/h-entry/u-property.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions