commonmark / commonmark/cmark

Auto-escape HTML input

Open
#176 18 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2k
Forks
691
Avg merge
1d 16h
Merged PRs (30d)
1

Description

I'd like to have an input option that will treat HTML as literal text.

For example:

Some text with <tags>.

Will give only a text node with the literal contents Some text with <tags>, instead of the HTML node.

This option will basically auto escape all <,> and the like in regular text. I'm using cmark as part of a C++ documentation generator, where you'd often have template names and thus something that looks like HTML. Escaping all occurrences manually is not very convenient in that case.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files or tests. Begin by locating cmark's parser-option entry point and existing raw-HTML handling, then determine how literal text should be represented. Done means an option treats angle-bracket-like input as literal text rather than HTML, with coverage for the documented example.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.