From 78ff2d2fee65ce9280d2172c05db32f49c3f7fa0 Mon Sep 17 00:00:00 2001
From: fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>
Date: Mon, 17 Sep 2007 19:55:22 +0000
Subject: [PATCH] Modified html2x.pl URL validation regex: + allow port number
 in URL + allow : in URL path

git-svn-id: https://pandoc.googlecode.com/svn/trunk@1024 788f1e2b-df1e-0410-8736-df70ead52e1b
---
 web/html2x.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/html2x.pl b/web/html2x.pl
index 43218682d..86f71196e 100755
--- a/web/html2x.pl
+++ b/web/html2x.pl
@@ -19,7 +19,7 @@ if ($format =~ /^markdown\+$/) {
 }
 
 # Validate URL and format
-unless ($url =~ /^(https?:\/\/)?[\w#_-]+(\.[\w#_-]+)+[\w\/#=?_.-]*$/) {
+unless ($url =~ /^(https?:\/\/)?[\w#_-]+(\.[\w#_-]+)+(:\d+)?[\w\/#=:?_.-]*$/) {
   die "Illegal URL: $url\n" ;
 }
 unless ($format =~ /^markdown\+?|rst|latex|context|rtf|man|docbook$/) {