root/confluence/feedfilters/lolrus.pl

Revision 451, 479 bytes (checked in by confluence, 20 months ago)

added top-level directory for all my stuff, and Liferea filters.

  • Property svn:executable set to *
Line 
1#!/usr/bin/perl
2
3# This filter is a broad-spectrum decrapolizer for seriously malformed feeds which can break Liferea.  I add new rules as I discover new and exciting ways in which people can mess up XML.
4# Written by Adrianna Pinska
5# Licence: GPLv3
6
7
8while(<>) {
9    s#<img [^>]* http:="" [^>]*>#XML IDIOCY REMOVED BY LOLRUS#g;
10    s#\\"#"#g;
11    s#:=""#=""#g;
12    s#href=""(http[^ >]*)#href="\1"#g;
13    s#src="&lt;img src="([^"]*)"[^/]*/&gt;[^"]*"#src="\1"#g;
14    print $_;
15}
Note: See TracBrowser for help on using the browser.