Permalink
Browse files

Add stripping of new WaPo feedsportal ads. Bump version.

  • Loading branch information...
1 parent bfc9005 commit 9918f1f06ada732cbeaa5478e049253670cfe378 @danmactough committed Oct 31, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 package.json
  2. +1 −0 resanitize.js
View
@@ -1,7 +1,7 @@
{ "name" : "resanitize"
, "author" : "Dan MacTough <danmactough@gmail.com>"
, "description" : "Regular expression-based HTML sanitizer and ad remover, geared toward RSS feed descriptions"
-, "version" : "0.1.5"
+, "version" : "0.1.6"
, "keywords" : ["sanitize", "html", "regexp", "security"]
, "homepage" : "http://github.com/danmactough/node-resanitize"
, "repository" :
View
@@ -199,6 +199,7 @@ function stripAds (str) {
.replace(/<img[^>]*?src=("|')http:\/\/feeds\.[^>]+?\.[^>]+?\/(?:~|%7e)r\/[^>]+?\1[\s\S]*?>/gi, '')
.replace(/<img[^>]*?src=("|')http:\/\/rss\.nytimes\.com\/c\/[^>]*?\1.*?>.*$/gim, '')
.replace(/<img[^>]*?src=("|')http:\/\/feeds\.washingtonpost\.com\/c\/[^>]*?\1.*?>.*$/gim, '')
+ .replace(/<img[^>]*?src=("|')http:\/\/[^>]*?\.?feedsportal\.com\/c\/[^>]*?\1.*?>.*$/gim, '')
.replace(/<img[^>]*?src=("|')http:\/\/(?:feedads\.googleadservices|feedproxy\.google|feeds2\.feedburner)\.com\/(?:~|%7e)r\/[^>]+?\1[\s\S]*?>/gi, '')
.replace(/<img[^>]*?src=("|')http:\/\/rss\.cnn\.com\/~r\/[^>]*?\1[\s\S]*?>/gi, '')
.replace(/<img[^>]*?src=("|')http:\/\/[^>]*?\.?fmpub\.net\/adserver\/[^>]*?\1[\s\S]*?>/gi, '')

0 comments on commit 9918f1f

Please sign in to comment.