Skip to content
This repository was archived by the owner on Jul 24, 2023. It is now read-only.

Commit 542cac4

Browse files
author
Zaid Zawaideh
committed
catch Encoding::UndefinedConversionError for compatibility with JRuby 1.9 mode
1 parent abdcf65 commit 542cac4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/openid/consumer/html_parse.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def OpenID.unescape_hash(h)
3636
def OpenID.parse_link_attrs(html)
3737
begin
3838
stripped = html.gsub(REMOVED_RE,'')
39-
rescue ArgumentError
39+
rescue ArgumentError, Encoding::UndefinedConversionError
4040
stripped = html.encode('UTF-8', 'binary', :invalid => :replace, :undef => :replace, :replace => '').gsub(REMOVED_RE,'')
4141
end
4242
parser = HTMLTokenizer.new(stripped)

0 commit comments

Comments
 (0)