Skip to content
New issue

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

Some UTF8 multibyte chars are splitted into invalid UTF8 sequences #2

Closed
gfx opened this issue Jan 30, 2017 · 2 comments
Closed

Some UTF8 multibyte chars are splitted into invalid UTF8 sequences #2

gfx opened this issue Jan 30, 2017 · 2 comments

Comments

@gfx
Copy link

gfx commented Jan 30, 2017

p Greenmat::Markdown.new(
    Greenmat::Render::HTML.new,
    fenced_code_blocks: true
  ).render("```ム")

produces:

"<pre><code class=\"\xE3\x83\"></code></pre>\n"

which must be "<pre><code class=\"ム\"></code></pre>\n". Because \xE3\x83 is a invalid UTF8 sequence, the output result easily causes encoding errors (e.g. by Nokogiri).

Note: redcarpet also has the same bug.

@gfx
Copy link
Author

gfx commented Jan 30, 2017

There is a PR in redcarpet: vmg#464

@r7kamura
Copy link

@gfx We'll check it and move to solve this problem. Thank you for your reporting 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants