cliss / camel

"Camel" is a blogging platform written in Node.js. It is designed to be fast, simple, and lean.
MIT License
269 stars 52 forks source link

Everything up to and including a <script> tag was omitted from RSS #14

Closed bdesham closed 10 years ago

bdesham commented 10 years ago

The "[\s\S]" in the regular expression was swallowing up the entire article up to the <script> tag. Removing this allows the regex to remove just the tag itself. (I also changed the greedy "" quantifier to the non-greedy "*?"; this will ensure that only one <script> at a time is removed. Otherwise, if there were more than one script tag in an article then everything between the first and last <script> would have been cut out.)

cliss commented 10 years ago

I didn't even notice that; thanks for the quick fix!

bdesham commented 10 years ago

No problem!