Possible Media Type error?

For technical support and bug reports for all editions of CSS HTML Validator, including htmlval for Linux and Mac.
Post Reply
TomHTML
Rank III - Intermediate
Posts: 75
Joined: Sun Feb 04, 2018 10:19 am

Possible Media Type error?

Post by TomHTML »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible Media Type error?

Post by Albert Wiersch »

Hello,

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

Thanks for reporting it!
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
TomHTML
Rank III - Intermediate
Posts: 75
Joined: Sun Feb 04, 2018 10:19 am

Re: Possible Media Type error?

Post by TomHTML »

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
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Possible Media Type error?

Post by Albert Wiersch »

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.
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply