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

If property has a dot in it, parsing fails #2

Closed
bebraw opened this issue Jul 16, 2014 · 1 comment
Closed

If property has a dot in it, parsing fails #2

bebraw opened this issue Jul 16, 2014 · 1 comment

Comments

@bebraw
Copy link

bebraw commented Jul 16, 2014

var Und = require('upndown');
var und = new Und();

var data = '<bottle .label="">\'</bottle></amount>';

console.log(und.convert(data));

yields

undefined:121
                throw "Parse Error: " + html;
                                      ^
Parse Error: <bottle .label="">'</bottle></amount></div>

Maybe just skip properties like that?

netgusto pushed a commit to netgusto/htmlparser-jresig that referenced this issue Aug 5, 2014
Fixing parsing issue when html contains non-valid attribute

See netgusto/upndown#2
@netgusto
Copy link
Owner

netgusto commented Aug 5, 2014

Fixed. Non-valid html attributes are dropped by the parser.

Added a test to check this (html/attributes.md).

upndown is now v0.0.8 and requires an dependency update (npm update).

@netgusto netgusto closed this as completed Aug 5, 2014
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