Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Giving bad URL causes bad behavior #25

rogovdm opened this Issue · 1 comment

2 participants


with query = ""

var parser = new FeedParser().parseUrl(query, function (err, meta, art) {

we have:

TypeError: Cannot call method 'trim' of undefined
at /usr/home//data/www/**/node_modules/feedparser/main.js:101:60


Thanks for the report. That was actually just a plain ol' bug.

Note that because feedparser uses sax, and sax aspires to be a streaming HTML parser, an HTML document won't cause a parser error -- you just won't get any meta or articles.

Beginning with v0.10.1 (which contains the bug fix), you can pass {strict: true} to the feedparser constructor to turn on sax's strict mode, which will result in a parser error on HTML (but not on XHTML, I don't think).

@danmactough danmactough closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.