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
This commit is contained in:
fiddlosopher 2007-09-17 19:55:22 +00:00
parent 65047e354a
commit 78ff2d2fee

View file

@ -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$/) {