mf2py icon indicating copy to clipboard operation
mf2py copied to clipboard

Implied photo relative path resolution failure

Open andyleap opened this issue 6 years ago • 1 comments

Looks like there's a problem where relative path resolution doesn't kick in in some cases. Example:

<img class="h-card" alt="Jane Doe" src="jane.jpeg"/>
<object class="h-card" data="jane.jpeg">Jane Doe</object>

is parsed as

  "items": [
    {
      "properties": {
        "name": [
          "Jane Doe"
        ],
        "photo": [
          "http://example.com/jane.jpeg"
        ]
      },
      "type": [
        "h-card"
      ]
    },
    {
      "properties": {
        "name": [
          "Jane Doe"
        ],
        "photo": [
          "jane.jpeg"
        ]
      },
      "type": [
        "h-card"
      ]
    }
  ]

andyleap avatar Aug 25 '19 23:08 andyleap

here is a full example

<html>

<base href="http://example.com" />

<img class="h-card" alt="Jane Doe" src="jane-img.jpeg"/>
<object class="h-card" data="jane-object.jpeg">Jane Doe</object>

</html>

is parsed as two h-cards. The first one is correct with the relative URL resolved

    {
      "properties": {
        "name": [
          "Jane Doe"
        ],
        "photo": [
          "http://example.com/jane-img.jpeg"
        ]
      },
      "type": [
        "h-card"
      ]
    }

but the second one still has a relative URL even if base is specified

 {
      "properties": {
        "name": [
          "Jane Doe"
        ],
        "photo": [
          "jane-object.jpeg"
        ]
      },
      "type": [
        "h-card"
      ]
    }

kartikprabhu avatar Aug 26 '19 00:08 kartikprabhu