Fix broken spec.

Fix broken spec.

Follow-up to 3c678df942b9322bfda5eb47d428b1c692ac0bf4

diff --git a/lib/search.rb b/lib/search.rb
index 0a3ab79..3daf57c 100644
--- a/lib/search.rb
+++ b/lib/search.rb
@@ -89,15 +89,16 @@ class Search
     end
 
     data.gsub!(/\S+/) do |str|
-      if str.match?(/^(https?:\/\/)[\S]+$/)
+      if str =~ /^["]?((https?:\/\/)[\S]+)["]?$/
         begin
-          uri = URI.parse(str)
+          uri = URI.parse(Regexp.last_match[1])
           uri.query = nil
           str = uri.to_s
         rescue URI::Error
           # don't fail if uri does not parse
         end
       end
+
       str
     end
 

GitHub sha: 2607bb60

This commit appears in #10865 which was approved by SamSaffron. It was merged by tgxworld.