Skip to content

Lowercase <![cdata[]]> incorrectly parsed in inlines #193

@wooorm

Description

@wooorm

Spec does not mention that lowercase should be ok, rather, to me it reads as if it should not be allowed: https://spec.commonmark.org/0.29/#cdata-section.
The “Block” version of commonmarkjs behaves correctly and does not allow lowercase, but because of the single regex to parse “inline” html, it’s allowed.

Input:

<![cdata[]]>

Yields:

<p><![cdata[]]></p>

Expected:

<p>&lt;![cdata[]]&gt;</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions