Skip to content
This repository was archived by the owner on Sep 1, 2025. It is now read-only.
This repository was archived by the owner on Sep 1, 2025. It is now read-only.

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

Description

@gfx
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions