Skip to content

Commit

Permalink
Fix henrik#11 punnycode url with trailing -- and alnum fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
bv-sumit committed Dec 9, 2020
1 parent f324644 commit f3b338e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module ValidatesUrlFormatOf
\A
https?:// # http:// or https://
([^\s:@]+:[^\s:@]*@)? # optional username:pw@
( ((#{ALNUM}+\.)*xn---*)?#{ALNUM}+([-.]#{ALNUM}+)*\.[a-z]{2,6}\.? | # domain (including Punycode/IDN)...
( ((#{ALNUM}+\.)*xn---*)?#{ALNUM}+([-.]#{ALNUM}+)*\.[a-z]{2,6}\.?(--#{ALNUM}*)? | # domain (including Punycode/IDN)...
#{IPv4_PART}(\.#{IPv4_PART}){3} ) # or IPv4
(:\d{1,5})? # optional port
([/?]\S*)? # optional /whatever or ?whatever
Expand Down

0 comments on commit f3b338e

Please sign in to comment.