Skip to content

Regression: HTML comments get escaped #5

Open
@ir-regular

Description

Symptom:

  1. Turn on Cryogen "previews" in a new installation (:previews? true)
  2. Add <!–- more -–> after one paragraph in one post
  3. <!–- more -–> is escaped and rendered to the user. Furthermore, it does not restrict snippet length.

Reason:

Snippet trimming function expects <!-- more --> to be parsed as an HTML comment. (See more-marker?) However, this is what it gets: {:tag :p, :attrs nil, :content (<!–-more-–>)}

Tried:

I printed the document at various stages of rendering, and found that the comment comes out already escaped from render-fn (as defined in cryogen-flexmark plugin).

Flexmark does have a couple different flags related to comments and escaping, which I tried setting to false (even though they should be false by default). This didn't help. There don't seem to be any open issues for HTML comments in the flexmark project.

Next:

Be good if someone else read the flexmark documentation again, I might have missed the relevant flag combination.

You could also look at the Document object that comes out of Parser.parse and see if it parsed the comment correctly. This would narrow down the flag search to either parsing or rendering. Unfortunately I don't have the environment set up for this at the moment.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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