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 Feb 13, 2013
Merged
Fix 'invalid byte sequence in UTF-8' error in parse_link_attrs#46dennisreimann merged 6 commits intoopenid:masterfrom
dennisreimann merged 6 commits intoopenid:masterfrom
Conversation
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? |
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
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
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
Contributor
|
Thank you, @zawaideh 🍰 Version got bumped to 2.2.3 and it is available on RubyGems :) |
Contributor
Author
|
👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.