comparison roundup/cgi/templating.py @ 4010:797eacd945af

add tests for and fix alex's examples
author Richard Jones <richard@users.sourceforge.net>
date Mon, 01 Sep 2008 01:45:33 +0000
parents e335ce40d6c8
children a73bac81eda2
comparison
equal deleted inserted replaced
4009:e335ce40d6c8 4010:797eacd945af
1247 class StringHTMLProperty(HTMLProperty): 1247 class StringHTMLProperty(HTMLProperty):
1248 hyper_re = re.compile(r'''( 1248 hyper_re = re.compile(r'''(
1249 (?P<url> 1249 (?P<url>
1250 ( 1250 (
1251 (ht|f)tp(s?):// # protocol 1251 (ht|f)tp(s?):// # protocol
1252 ([\w]+:\w+@)? # username/password 1252 ([\w]+(:\w+)?@)? # username/password
1253 ([\w\-]+\.)+ # hostname 1253 ([\w\-]+) # hostname
1254 [\w]{2,5} # TLD 1254 ((\.[\w-]+)+)? # .domain.etc
1255 | # ... or ... 1255 | # ... or ...
1256 ([\w]+(:\w+)?@)? # username/password
1256 www\. # "www." 1257 www\. # "www."
1257 ([\w\-]+\.)+ # hostname 1258 ([\w\-]+\.)+ # hostname
1258 [\w]{2,5} # TLD 1259 [\w]{2,5} # TLD
1259 ) 1260 )
1260 (:[\d]{1,5})? # port 1261 (:[\d]{1,5})? # port

Roundup Issue Tracker: http://roundup-tracker.org/