From: Oleg Broytman Date: Mon, 19 May 2008 15:31:23 +0000 (+0000) Subject: Copied some URL regexps from Gajim. X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=0a1ae939e8f0d44591ec448cbc62b5fac0fbc5f3;p=phdru.name%2Fphdru.name.git Copied some URL regexps from Gajim. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@75 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/phd_pp.py b/phd_pp.py index b3ad03a..9cd8ca1 100644 --- a/phd_pp.py +++ b/phd_pp.py @@ -2,11 +2,11 @@ import os, re, time, urllib from Cheetah.Template import Template -# Copied from ZWiki +# Copied from ZWiki and Gajim urlchars = r'[A-Za-z0-9/:@_%~#=&\.\-\?\+\$,]+' urlendchar = r'[A-Za-z0-9/]' -url = r'["=]?((about|file|ftp|gopher|http|https|mailto|news|telnet):%s)' % \ +url = r'["=]?((about|file|ftp|gopher|http|https|mailto|news|telnet|ed2k|irc|sip|magnet):%s)' % \ (urlchars+urlendchar) def _url2href(match):