[BUG] Edit tool introduces Unicode curly quotes (U+201D) in HTML attributes, silently breaking CSS selectors

Resolved 💬 5 comments Opened Mar 1, 2026 by ivandavidov Closed Apr 4, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using the Edit tool to modify HTML content containing Bulgarian (non-ASCII) text, Claude sometimes replaces standard ASCII double quotes (", U+0022) in HTML class= attributes with right double quotation marks (", U+201D). For example, class="stat-note" becomes class=\u201dstat-note\u201d. The browser doesn't recognize U+201D as an attribute delimiter, so the curly quote characters become part of the class name itself, silently breaking all CSS selectors targeting those classes.

What Should Happen?

ASCII quotes in HTML attributes must never be replaced with typographic/curly quotes. The Edit tool should always preserve " (U+0022) in code contexts.

Error Messages/Logs

No error is shown. The substitution is silent. The only symptom is broken CSS styling at runtime. In my case, affected <p> elements fell back to Skeleton CSS default p { margin-bottom: 2.5rem } instead of the intended .stat-note { margin: 0 0 0.3rem }, causing a visible layout gap.

Steps to Reproduce

  1. Open a project with an HTML file containing non-ASCII text (e.g. Bulgarian, Cyrillic)
  2. Use the Edit tool to replace the text content of multiple HTML elements that have class="some-class" attributes
  3. Inspect the resulting file bytes — some class= attributes will have U+201D (\xe2\x80\x9d) instead of U+0022 (\x22)

In my case, 6 out of 31 nearly identical <p class="stat-note"> / <p class="stat-detail"> elements were affected. The other 25 kept correct ASCII quotes.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.0.33

Platform

Other

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

The affected file was docs/stats/index.html in a Bulgarian-language static site. The Edit tool was used to rewrite description paragraphs across 31 HTML sections. The curly quotes appeared only on lines where the text content contained Bulgarian quotation marks („...") — possibly the model's output confused the context between content quotation marks and attribute delimiters.

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗