Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Error while processing the html #2031

Open
iderets opened this issue Feb 12, 2018 · 2 comments
Open

Error while processing the html #2031

iderets opened this issue Feb 12, 2018 · 2 comments

Comments

@iderets
Copy link

iderets commented Feb 12, 2018

Hi. I'm getting the error while parsing some kinds of html markdown. Here is simple example:

<a href="
#somehhref
">link</a>

That snippet can be copied to https://caja.appspot.com/ after pressing Cajole getting the error:

Uncaught TypeError: Cannot read property 'hasScheme' of null

at

ses-single-frame.js?debug=1:32638


The reason of that error is \n after href parameter. As quick workaround I can single lined that html and it works fine, but there is side effect with other htmls (for example with <pre> tag)

@metaweta
Copy link
Contributor

That's not valid HTML, so Caja doesn't support it. You can say

<a href=
"#somehhref"
>link</a>

but you can't have line breaks inside the quotes.

@kpreid
Copy link
Contributor

kpreid commented Feb 12, 2018

Actually, newlines in attribute values are permitted (and sometimes used purposefully in title/alt attributes). I'm not sure whether it's okay by the specs to have whitespace around a URI value, but in any case Caja shouldn't be “crashing” on this input whether or not it is conformant.

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

No branches or pull requests

3 participants