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

Fix 'invalid byte sequence in UTF-8' error in parse_link_attrs#46

Merged
dennisreimann merged 6 commits intoopenid:masterfrom
zawaideh:master
Feb 13, 2013
Merged

Fix 'invalid byte sequence in UTF-8' error in parse_link_attrs#46
dennisreimann merged 6 commits intoopenid:masterfrom
zawaideh:master

Conversation

@zawaideh
Copy link
Copy Markdown
Contributor

This pull request fixes handling of invalid byte type errors for some domains when performing gsub in the ' lib/openid/consumer/html_parse.rb' file on line 37. I updated it to resuce the error in that case and force it to UTF-8 with removing of the offending character.

I added a test and all tests pass.

@dennisreimann
Copy link
Copy Markdown
Contributor

Thanks for your contribution. I'll merge this in once the tests are green again, as far as I can see, the failing ones are related to the hash-syntax being incompatible with Ruby 1.8, can you fix this?

zawaideh and others added 4 commits February 12, 2013 14:06
force_encoding doesn't exist in ruby 1.8. Pass string as is in 1.8 and only force_encoding if string responds to it
@zawaideh
Copy link
Copy Markdown
Contributor Author

still running into issues with jruby under ruby1.9 compatibility mode. I'll see if I can get it working tomorrow.

…binary properly. Now falling back to using ASCII as source
@zawaideh
Copy link
Copy Markdown
Contributor Author

@dennisreimann All tests are passing now. Thanks!

dennisreimann added a commit that referenced this pull request Feb 13, 2013
Fix 'invalid byte sequence in UTF-8' error in parse_link_attrs
@dennisreimann dennisreimann merged commit 0498ee1 into openid:master Feb 13, 2013
@dennisreimann
Copy link
Copy Markdown
Contributor

Thank you, @zawaideh 🍰

Version got bumped to 2.2.3 and it is available on RubyGems :)

@zawaideh
Copy link
Copy Markdown
Contributor Author

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants