We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is this a bug?
irb(main):012:0> utf8_string = "日本語" => "日本語" irb(main):012:0> utf8_string.encoding => #<Encoding:UTF-8> irb(main):013:0> escaped = Loofah.scrub_fragment(utf8_string, :escape).to_s => "日本語" irb(main):015:0> escaped.encoding => #<Encoding:US-ASCII> irb(main):016:0> escaped.encode('UTF-8') => "日本語" irb(main):019:0> escaped.force_encoding('UTF-8') => "日本語"
The text was updated successfully, but these errors were encountered:
It seems like utf-8 characters are also escaped. Maybe it's intended behavior?
Sorry, something went wrong.
Agree, this looks like a bug:
utf8_string = "日本語" doc = Nokogiri::HTML::DocumentFragment.parse utf8_string doc.to_s # => "日本語" doc.to_s.encoding # => #<Encoding:UTF-8> doc = Loofah::HTML::DocumentFragment.parse utf8_string doc.to_s # => "日本語" doc.to_s.encoding # => #<Encoding:US-ASCII>
fixed on master by 00e91cc and c3514cb
thanks, @tenderlove!
No branches or pull requests
Is this a bug?
Software versions:
The text was updated successfully, but these errors were encountered: