root/confluence/feedfilters/linkifier.pl

Revision 451, 387 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 makes plain text URLs which appear in a feed item's description into clickable links.  Definitely works on Twitter feeds.
4# Written by Adrianna Pinska
5# Licence: GPLv3
6
7while(<>) {
8    s#(?<!=")(?<!>)(http[^ <]*)#&lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;#g;
9    s#(?<=<description>)(http[^ <]*)#&lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;#g;
10    print $_;
11}
Note: See TracBrowser for help on using the browser.