Cheerio: Explain \\: escaping colon for xml namespace pseudo

Created on 22 Mar 2014  路  5Comments  路  Source: cheeriojs/cheerio

While attempting to parse an RSS feed, I got the SyntaxError: unmatched pseudo-class :origlink error. Looking through the issues, I only found references to jQuery pseudo-classes.

For XML parsing, it might help to mention escaping the : with a double backslash. On the other hand, that's a standard CSS selector feature, so maybe the text of this issue will be enough SEO to help others who run into the same error.

Most helpful comment

lol just ended up back here a year and a half later. It might be nice if this error message were slightly different when xmlMode:true to give a hint at the quick fix.

All 5 comments

As you already said, it's a basic CSS feature. Having an issue to refer to is useful, but it hasn't to be open :)

Thanks, I had exactly this issue!

Me too! Hooray for SEO! :smile:

In case anyone stumbles upon this with the intention to use attr, escaping is not necessary (nor possible) in that use case.

lol just ended up back here a year and a half later. It might be nice if this error message were slightly different when xmlMode:true to give a hint at the quick fix.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

becush picture becush  路  3Comments

miguelmota picture miguelmota  路  3Comments

trevorfrese picture trevorfrese  路  4Comments

robogeek picture robogeek  路  4Comments

chenweiyj picture chenweiyj  路  5Comments