Permalink
Browse files

allow more characters to be present in urls when converting urls to l…

…inks.
  • Loading branch information...
1 parent b43a44c commit 04161dbaa6b667eff5bc6f695b8d1cd0596c8efd @antirez committed Oct 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app.rb
View
2 app.rb
@@ -1530,7 +1530,7 @@ def compute_comment_score(c)
# HTML links. We try to handle the case of an url that is followed by a period
# Like in "I suggest http://google.com." excluding the final dot from the link.
def urls_to_links(s)
- urls = /((https?:\/\/|www\.)([-\w\.]+)+(:\d+)?(\/([\w\/_\.]*(\?\S+)?)?)?)/
+ urls = /((https?:\/\/|www\.)([-\w\.]+)+(:\d+)?(\/([\w\/_\.\-\%]*(\?\S+)?)?)?)/
s.gsub(urls) {
if $1[-1..-1] == '.'
url = $1.chop

0 comments on commit 04161db

Please sign in to comment.