about summary refs log tree commit diff
path: root/config/initializers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-06-15 20:21:47 +0200
committerGitHub <noreply@github.com>2018-06-15 20:21:47 +0200
commit0df91c7b1e05952ebbfc552915e995d55af0a403 (patch)
treeda517578a12e5f08ec8481b7b0db7cc39506e5cd /config/initializers
parent09147186b79f80cf3ef3aa8ba7e6e5e032faa255 (diff)
Add dat, dweb, ipfs, ipns, ssb, gopher protocols to URL extractor (#7810)
* Add dat:// and gopher:// to URL extractor

Fix #6072

* Fix comment indent

* Add dweb, ipfs, ipns, ssb
Diffstat (limited to 'config/initializers')
-rw-r--r--config/initializers/twitter_regex.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/initializers/twitter_regex.rb b/config/initializers/twitter_regex.rb
index 7fa828300..c227f92d3 100644
--- a/config/initializers/twitter_regex.rb
+++ b/config/initializers/twitter_regex.rb
@@ -30,7 +30,7 @@ module Twitter
       (                                                                                     #   $1 total match
         (#{REGEXEN[:valid_url_preceding_chars]})                                            #   $2 Preceeding chracter
         (                                                                                   #   $3 URL
-          (https?:\/\/)?                                                                    #   $4 Protocol (optional)
+          ((https?|dat|dweb|ipfs|ipns|ssb|gopher):\/\/)?                                    #   $4 Protocol (optional)
           (#{REGEXEN[:valid_domain]})                                                       #   $5 Domain(s)
           (?::(#{REGEXEN[:valid_port_number]}))?                                            #   $6 Port number (optional)
           (/#{REGEXEN[:valid_url_path]}*)?                                                  #   $7 URL Path and anchor