WTTechLabs / taskboard

your on-line tool for task management fun
http://taskboard.cognifide.com
GNU General Public License v3.0
60 stars 16 forks source link

[patch] Adding card with URL doesn't work if there is port number specified #66

Closed szpak closed 14 years ago

szpak commented 14 years ago

Port number specified in URL breaks URL recognition. For example: https://www.example.com:8443/issue-1234

szpak commented 14 years ago

I think there is a missing ":" in url_parser.rb.

--- lib/url_parser.rb.bak   2009-12-09 22:24:00.000000000 +0100
+++ lib/url_parser.rb   2009-12-09 22:24:42.000000000 +0100
@@ -17,7 +17,7 @@

 class UrlParser

-  URL_REGEXP = /(^$)|(^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$)/ix.freeze
+  URL_REGEXP = /(^$)|(^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}((:[0-9]{1,5})?\/.*)?$)/ix.freeze

   def self.is_url url
     not (url =~ URL_REGEXP).nil?
szpak commented 14 years ago

I've made a fix in separate branche/fork. Please check it and merge into trunk. http://github.com/szpak/taskboard/tree/0500c3b631ae8093f6eaf117ff9c15094af74f9b