FIX: do not double encode percentage in url

FIX: do not double encode percentage in url

diff --git a/Gemfile.lock b/Gemfile.lock
index 0ff8504..ad944ec 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,7 +1,7 @@
 PATH
   remote: .
   specs:
-    onebox (1.9.7)
+    onebox (1.9.8)
       htmlentities (~> 4.3)
       moneta (~> 1.0)
       multi_json (~> 1.11)
diff --git a/lib/onebox/helpers.rb b/lib/onebox/helpers.rb
index b5519de..54007b1 100644
--- a/lib/onebox/helpers.rb
+++ b/lib/onebox/helpers.rb
@@ -201,7 +201,7 @@ module Onebox
       # = *( pchar / "/" / "?" )
       # CGI.escape turns space into + which is the most backward compatible
       # however it doesn't roundtrip through URI.unescape which prefers %20
-      CGI.escape(query_string).gsub('+', '%20')
+      CGI.escape(query_string).gsub('%25', '%').gsub('+', '%20')
     end
 
     # Percent-encodes a URI string per RFC3986 - https://tools.ietf.org/html/rfc3986

GitHub sha: 9a3d81b1

This commit has been mentioned on Discourse Meta. There might be relevant details there: