microformats/php-mf2

parser compatibility: hentry/hreview rel=tag

gRegorLove opened this issue · 1 comments

http://microformats.org/wiki/h-entry#Parser_Compatibility

rel=tag - parse as p-category. While not a class name nor typical microformats property, rel=tag was the typical way to tag an hentry. Thus parsers should look for rel=tag hyperlinks inside an hentry, and take the last path segment of their "href" value as a value for a p-category property.

Minimal example:

<div class="hentry">
  <h1 class="entry-title">Test upgrading rel=tag</h1>
  <a href="/tag/reviews" rel="tag">Reviews</a>
</div>

Current parse:

    "items": [
        {
            "type": [
                "h-entry"
            ],
            "properties": {
                "name": [
                    "Test upgrading rel=tag"
                ]
            }
        }
    ]

Expected result:

    "items": [
        {
            "type": [
                "h-entry"
            ], 
            "properties": {
                "category": [
                    "reviews"
                ], 
                "name": [
                    "Test upgrading rel=tag"
                ]
            }
        }
    ]

Confirmed mf2py is parsing this correctly.

Per this backcompat update, the same applies to hreview. See examples in wiki edit summary.