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

Minor difference in string produces different output #1990

Open
Meerkov opened this issue Jan 21, 2016 · 0 comments
Open

Minor difference in string produces different output #1990

Meerkov opened this issue Jan 21, 2016 · 0 comments

Comments

@Meerkov
Copy link

Meerkov commented Jan 21, 2016

In https://github.com/google/caja/blob/27248d0f223038346d63278b52ec038e77418ba9/src/com/google/caja/plugin/html-sanitizer.js when using javascript function parse(htmlText, handler, param) {
in javascript parseTagAndAttrs(parts, pos) {
The two badly formed html strings produce different output:

<p a='b' x='<

produces an empty dom

<p a='b' x='>

produces a dom containing a p tag, e.g. <p a="b" ></p>

This seems like a minor issue, but it's a little bit weird. It's possible this is on purpose, but based on the comments, this looks like an oversight in the way the parser is seeking out the next '>' token.

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

No branches or pull requests

1 participant