GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — id(web): inline HTML (<sub>/<sup>/<u>/…) is backslash-escaped on save — tags become literal text · Issue #943 · developing-today/code

id(web): inline HTML (<sub>/<sup>/<u>/…) is backslash-escaped on save — tags become literal text #943

New issue
Copy link
New issue
Copy link
Closed
#1009
Closed
id(web): inline HTML (<sub>/<sup>/<u>/…) is backslash-escaped on save — tags become literal text#943
#1009
Copy link
Assignees
dezren39
Labels
app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 26, 2026
Issue body actions

Problem

In the id web editor, any inline HTML in a markdown file other than <img> / <a><img></a> is destroyed on save: the tags come back backslash-escaped as literal text.

Verified probe on main a2eef6f7 (standalone crate compiling the verbatim pkgs/id/src/web/markdown.rs codec from main; full log in the goal's hidden_files probe-2026-10-25-2312/probe2.log):

  • Input: water is H<sub>2</sub>O and x<sup>2</sup>
    • markdown_to_prosemirror produces plain text nodes "<sub>", "2", "</sub>", …
    • Save (prosemirror_to_markdown) emits: water is H\<sub\>2\</sub\>O and x\<sup\>2\</sup\>
    • The rendered document now literally shows \<sub\> instead of subscript markup.
  • Input: some <u>underlined</u> text → save emits some \<u\>underlined\</u\> text.

Root cause

pkgs/id/src/web/markdown.rs:354 — the NodeValue::HtmlInline arm of convert_node special-cases only img/linked-img tags; every other inline HTML tag falls through to text_node_with_marks(html, active_marks), turning the tag into a plain text node. On save, comrak's CommonMark renderer escapes the </> of text nodes, so the tag can never come back as HTML. Note commonmark_options() (markdown.rs:67) already sets render.unsafe = true for the sized-image HTML forms, so raw inline HTML is not rejected by policy elsewhere in this codec.

Why it matters

<sub>, <sup>, <u>, <kbd>, <mark>, <details> etc. are common in notes and technical docs. Opening such a file in the web editor and saving any unrelated edit silently corrupts every inline HTML tag in the file — the same silent-save-corruption class as #872/#873/#880/#881/#882.

Acceptance criteria

  • A markdown file containing inline HTML (at minimum <sub>, <sup>, <u>) round-trips through open → save without the tags being escaped: the saved markdown still contains the tags as HTML (or an explicitly equivalent representation that renders identically).
  • The existing img / linked-img HTML handling (id(web): parse_img_tag substring search lets data-src/data-width shadow the real img attributes — save rewrites the image URL #872, id(web): linked images [![alt](src)](href) lose their link in the markdown ↔ ProseMirror codec — save strips the href #880, id(web): sized linked images still lose their href on reload — PR #888's <a><img></a> HTML emission has no parse counterpart (and editor parseDOM drops the wrapping link) #893) is unchanged.
  • New unit tests in pkgs/id/src/web/markdown.rs cover the round-trip for at least <sub>/<sup>/<u> inline HTML.
  • If full passthrough is judged unsafe, the narrower fix (a whitelist of benign formatting tags) is implemented instead and the rejected set is named in the PR — silently escaping everything is the bug, not a fix.

Suggested direction

Carry non-img HtmlInline content through the PM doc in a form the save direction can emit back as a comrak HtmlInline node (instead of a Text node), mirroring how sized images already round-trip via NodeValue::HtmlInline in json_to_ast (markdown.rs:~1027). The editor (TS) side may need a matching node/mark handling note — flag it in the PR if the PM representation changes.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 26, 2026
  2. developing-today commented on Oct 26, 2026

    @developing-today
    developing-todayBot
    on Oct 26, 2026 – with developing.today
    Contributor
    More actions

    CODE-155

  3. github-actions
    assigned
    dezren39
    on Oct 26, 2026
  4. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator job
    • Session / ID: new-issue-creator run, 2026-10-25 23:15 CDT (America/Chicago)
    • Found via: filed this run
    • Task: HtmlInline arm (markdown.rs:354) turns non-img inline HTML into plain text nodes, so save escapes the tags (<sub> → \<sub\>). Verified this run with a standalone crate compiling the verbatim codec from main a2eef6f: H<sub>2</sub>O and <u>underlined</u> both round-trip to backslash-escaped literal text (log: goal hidden_files probe-2026-10-25-2312/probe2.log). Queued for the code pilot queue (triage packet — fix needs a representation choice).
    • Expectation: effort/m — done looks like inline HTML round-tripping unescaped (or a named benign-tag whitelist), with markdown.rs unit tests.
    • Links: n/a yet (queue packet enqueued this run)
  5. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Oct 26, 2026
  6. 27 remaining items

  7. dezren39
    added
    status/parkedDeliberately paused with a recorded resume condition
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/claimedQueue worker lifecycle state
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 26, 2026
  8. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 1131 (resume of parked claim)
    • Found via: queue claim
    • Task: Resume from implementation_complete: PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009 (html_inline atom node passthrough, Rust + editor.ts) was parked while CI re-ran after a rustfmt fix. All 28 checks now pass on head a8c01ca — merging it and verifying id(web): inline HTML (<sub>/<sup>/<u>/…) is backslash-escaped on save — tags become literal text #943 auto-closes.
    • Expectation: s — done = PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009 merged, id(web): inline HTML (<sub>/<sup>/<u>/…) is backslash-escaped on save — tags become literal text #943 closed, task completed.
    • Links: PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009 · branch queue/1131-943-html-inline
  9. dezren39
    added a commit that references this issue on Oct 26, 2026

    fix(id-web): html_inline passthrough — inline HTML round-trips unesca…

    d5a0812
  10. dezren39
    closed this as completedin #1009on Oct 26, 2026
  11. developing-today
    added
    status:done
    and removed
    status:in-review
    on Oct 26, 2026
  12. dezren39 commented on Oct 26, 2026

    @dezren39
    dezren39
    on Oct 26, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 1131
    • Found via: queue claim (resume of parked claim)
    • Task: Merged PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009 — html_inline atom-node passthrough so inline HTML (////…) round-trips unescaped. All 28 CI checks green on the final head; PR merged (squash, d5a0812) and this issue auto-closed.
    • Expectation: done — task 1131 completed with outcome fixed_merged.
    • Links: PR fix(id-web): html_inline passthrough — inline HTML round-trips unescaped (#943) #1009
  13. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.