Skip to content

Encode markdown formatted fields by default #508

@agreaves-ms

Description

@agreaves-ms

Summary

Encode HTML characters >, <, and additionally $ to their corresponding &gt;, &lt;, and &#36;. The models (GPT-5 and Claude Sonnet 4, as an example) will use these characters without realizing that they will cause issue in Markdown, sometimes making it seem like parts of these field were truncated, instead of having malformed Markdown. Claude Sonnet also tends to turn &gt; and &lt; into > and < when explicitly requesting the model to encode these fields (or add the fields as-is with the encoding).

Example

(There should be <6 of something and >8 of something, the codeblock is missing lines as well)

Image

Repro Steps

  1. Use the azure-devops-mcp server with GitHub Copilot and Claude Sonnet 4 or GPT-5.
  2. Ask it to use the mcp_ado_wit_create_work_item to create an Epic wth a Markdown formatted description. Ask it to add a list of metrics showing less than and greater than some metrics.

Expected

The Epic is made with a Markdown description and shows a list of metrics with > and < values.

Actual

The Markdown interpretter produces inconsistent content for the field leading to confusion.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions