You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying to override HtmlRenderer#text, I noticed that the encoding of the string after escape_html() is #Encoding:ASCII-8BIT:
deftext(node)putsnode.string_content.encoding.inspect# prints #<Encoding:UTF-8>putsescape_html(node.string_content).encoding.inspect# prints #<Encoding:ASCII-8BIT>end
A workaround I used was to apply force_encoding('utf-8') before continuing processing of the string.
Andreas
The text was updated successfully, but these errors were encountered:
Hi,
when trying to override
HtmlRenderer#text
, I noticed that the encoding of the string after escape_html() is #Encoding:ASCII-8BIT:A workaround I used was to apply
force_encoding('utf-8')
before continuing processing of the string.The text was updated successfully, but these errors were encountered: