mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 02:06:32 +00:00
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:
+1
-1
@@ -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$/) {
|
||||
|
||||
Reference in New Issue
Block a user