Skip to content

Commit

Permalink
Add stripping of new WaPo feedsportal ads. Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmactough committed Oct 31, 2012
1 parent bfc9005 commit 9918f1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{ "name" : "resanitize" { "name" : "resanitize"
, "author" : "Dan MacTough <danmactough@gmail.com>" , "author" : "Dan MacTough <danmactough@gmail.com>"
, "description" : "Regular expression-based HTML sanitizer and ad remover, geared toward RSS feed descriptions" , "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"] , "keywords" : ["sanitize", "html", "regexp", "security"]
, "homepage" : "http://github.com/danmactough/node-resanitize" , "homepage" : "http://github.com/danmactough/node-resanitize"
, "repository" : , "repository" :
Expand Down
1 change: 1 addition & 0 deletions resanitize.js
Expand Up @@ -199,6 +199,7 @@ function stripAds (str) {
.replace(/<img[^>]*?src=("|')http:\/\/feeds\.[^>]+?\.[^>]+?\/(?:~|%7e)r\/[^>]+?\1[\s\S]*?>/gi, '') .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:\/\/rss\.nytimes\.com\/c\/[^>]*?\1.*?>.*$/gim, '')
.replace(/<img[^>]*?src=("|')http:\/\/feeds\.washingtonpost\.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:\/\/(?: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:\/\/rss\.cnn\.com\/~r\/[^>]*?\1[\s\S]*?>/gi, '')
.replace(/<img[^>]*?src=("|')http:\/\/[^>]*?\.?fmpub\.net\/adserver\/[^>]*?\1[\s\S]*?>/gi, '') .replace(/<img[^>]*?src=("|')http:\/\/[^>]*?\.?fmpub\.net\/adserver\/[^>]*?\1[\s\S]*?>/gi, '')
Expand Down

0 comments on commit 9918f1f

Please sign in to comment.