Possible Media Type error?

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
TomHTML
Rank II - Novice
Rank II - Novice
Posts: 42
Joined: Sun Feb 04, 2018 10:19 am

Possible Media Type error?

Post by TomHTML » Tue Mar 26, 2019 1:07 pm

In checking links, the validator complains:
Expected an image media type but got "text/html; charset=utf-8" instead
The type it indicates is
meta twitter:url
, however, from the documentation, it seems that both the twitter:url and the og:url are supposed to provide the canonical url for the page on which the meta tag appears, so that if the page is shared, the true, canonical page's content is referenced.

The validator seems to think it should be a URL to an image. Is this a bug?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible Media Type error?

Post by Albert Wiersch » Tue Mar 26, 2019 2:00 pm

Hello,

Yes, this is a bug. It will be fixed in the next update. I'm sorry for the trouble.

Thanks for reporting it!
Image
Albert Wiersch

TomHTML
Rank II - Novice
Rank II - Novice
Posts: 42
Joined: Sun Feb 04, 2018 10:19 am

Re: Possible Media Type error?

Post by TomHTML » Fri Apr 19, 2019 1:26 am

I've discovered a similar bug. For a base element like <base href="https://example.com">, the validator throws a link error:

Status: Check Media Type
Type: meta twitter:url
Comment: Expected an image media type but got "text/html; charset=utf-8" instead

The <base> element should have nothing to do with Twitter, right?

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3407
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible Media Type error?

Post by Albert Wiersch » Fri Apr 19, 2019 3:05 pm

TomHTML wrote:
Fri Apr 19, 2019 1:26 am
I've discovered a similar bug. For a base element like <base href="https://example.com">, the validator throws a link error:

Status: Check Media Type
Type: meta twitter:url
Comment: Expected an image media type but got "text/html; charset=utf-8" instead

The <base> element should have nothing to do with Twitter, right?
Hi Tom,

I think you are running into the same bug.

If the type is "meta twitter:url" then it's not referring to the link in the "base" element because that link would be of type "base href".

If you want to send me a small sample HTML document that reproduces the problem then I can make sure that it's fixed in the upcoming update.
Image
Albert Wiersch

Post Reply