Fenced HTML code block containing inline SVG renders as a broken image icon

Open 💬 0 comments Opened Jul 22, 2026 by devforai-creator

Codex App version

26.715.9079.0

Platform

Windows

Description

A fenced code block with the html language identifier is rendered incorrectly when it contains an inline SVG filter.

The code block frame, html label, and copy button are displayed, but the source code is missing. A small broken-image icon appears inside the code block instead.

The supplied code contains no <img> or <image> element and does not reference any local image file.

Steps to reproduce

  1. Open Codex Desktop on Windows.
  2. Have the assistant return the following content inside a fenced code block whose language identifier is html:
<svg
  aria-hidden="true"
  width="0"
  height="0"
  style="position:absolute"
>
  <defs>
    <filter id="risu-squiggle-mycard">
      <feTurbulence
        type="fractalNoise"
        baseFrequency="0.02"
        numOctaves="2"
        seed="2"
        result="noise"
      />
      <feDisplacementMap
        in="SourceGraphic"
        in2="noise"
        scale="8"
        xChannelSelector="R"
        yChannelSelector="G"
      />
    </filter>
  </defs>
</svg>

<span
  style="
    display:inline-block;
    filter:url(#risu-squiggle-mycard);
  "
>
  자글자글한 텍스트
</span>
  1. Observe the rendered assistant response.

Expected behavior

The complete HTML/SVG source should be displayed as syntax-highlighted literal text inside the code block.

Actual behavior

The source disappears and the code block contains only a broken-image placeholder.

Workaround

Using text instead of html as the fenced-code language identifier avoids treating the content incorrectly.

Additional information

Possibly related to #14576, but this reproduction does not use a local Markdown image or any image path.

Screenshot attached: codex_bug1.png

<img width="1152" height="720" alt="Image" src="https://github.com/user-attachments/assets/55bf2f71-008f-46ad-955a-0e814f1e9ad4" />

View original on GitHub ↗