Report a bug related to generating comments for XML

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When I asked cursor to generate an SQL statement, the comments and some syntax for greater than and less than in the final generated SQL statement were incorrect, such as the comment start symbol being<! --What is actually generated is<! –

Steps to Reproduce

Just need to request the generation of SQL or generate some SQL with=>or<=

Expected Behavior

For example,<! --Or<

Screenshots / Screen Recordings

cursor-xml-bug.png

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.50
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 24.6.0

For AI issues: which model did you use?

auto

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey there,

This sounds like it’s most likely something with the model itself—specifically how it’s handling certain SQL syntax characters like <, >, and comment delimiters (<!--). These are special characters that can sometimes get escaped or transformed incorrectly.

Could you share the request ID from when you’re seeing this behavior? You can get that by reviewing the docs here.

Potential workaround: You could try adding more explicit rules to your Cursor rules to correct the behavior. For example, you could add something like:

  • “When generating SQL, always use standard SQL comment syntax: -- for single-line comments and /* */ for multi-line comments”
  • “Ensure comparison operators (<, >, <=, >=) are written exactly as shown without HTML escaping”

Of course, this can probably be solved, but I hope it can fundamentally solve this problem. After all, this is very important to me, and cursor has become an essential tool for my daily life

And I’d love to get to the bottom of it. But for that, we need a request ID. :slight_smile:

e0f2e00e-7f32-4d04-bc11-4ee0c4ed7764

Hm. I’m not seeing much. You’re sure this is from the chat where you had the issue?

It’s also very helpful if you turn off privacy mode, at least for this request (if it’s reproducible)

Request IDs are limited when Privacy Mode is enabled. Disable Privacy Mode when reporting issues.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.