Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when converting anchors with type attribute #167

Open
garlab opened this issue Feb 13, 2017 · 1 comment
Open

Error when converting anchors with type attribute #167

garlab opened this issue Feb 13, 2017 · 1 comment

Comments

@garlab
Copy link

garlab commented Feb 13, 2017

Hi,

I'm working with a CMS generating links like this:

<a href="file.xls" type="application/vnd.ms-excel; length=71680">download</a>

When I try to convert that file I get:

<a href="file.xls" type="application/vnd.ms-excel; length=71680"> on line 1
 - The attribute 'type' in tag 'a' is set to the invalid value 'application/vnd.ms-excel; length=71680'.
   [code: INVALID_ATTR_VALUE  category: DISALLOWED_HTML]

However this seems to be a valid attribute, according to MDN:

type
  Specifies the media type in the form of a MIME type for the linked URL. This is provided strictly as advisory information; there is no built-in behavior for it.

Shouldn't the library just remove the type attribute without raising any error?

@SGudbrandsson
Copy link
Contributor

@garlab good point.
We'll look into improving this, thanks. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants