diff options
Diffstat (limited to 'lib/uri/common.rb')
-rw-r--r-- | lib/uri/common.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/uri/common.rb b/lib/uri/common.rb index 17d9ffc28c..811ec98aad 100644 --- a/lib/uri/common.rb +++ b/lib/uri/common.rb @@ -370,7 +370,7 @@ module URI if str.encoding != Encoding::ASCII_8BIT if enc && enc != Encoding::ASCII_8BIT str.encode!(Encoding::UTF_8, invalid: :replace, undef: :replace) - str.encode!(enc, fallback: ->(x){"&#{x.ord};"}) + str.encode!(enc, fallback: ->(x){"&##{x.ord};"}) end str.force_encoding(Encoding::ASCII_8BIT) end |