Percent-Encoding XRef UID Special Characters in Microsoft Learn
Percent-Encoding XRef UID Special Characters in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
ReviewedEvidence1 sourceSectionWriting & Style
Quick answer
Percent-encode special characters in Microsoft Learn XRef UIDs when the documented XRef URL syntax requires it; for example, `#` in a UID is encoded as `%23`.
Key details
Core Issuepercent-encoding xref uid special characters in microsoft learn
RegisterMicrosoft Learn technical documentation
Important caveats
Scope Boundary
This page covers encoding characters inside an XRef UID. It does not replace the broader XRef owner for deciding when to use XRef links or how to choose their display text.
Further guidance
Content
Microsoft Learn’s XRef guidance requires special characters in UIDs to be percent-encoded and gives `System.Exception.%23ctor` as the encoded form of a UID containing `#ctor`.
Purpose
Keep Microsoft Learn source readable, maintainable, accessible, and predictable while following current contributor-platform conventions.
Sources and evidence
Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.
Use links in documentation — Contributor guide↗ (opens in a new tab)Microsoft · Current Microsoft Learn contributor guidance for documentation links, including file-relative and site-relative paths, split-article YML targets, bookmarks, XRef API links, reference-style links, explicit-anchor boundaries, and secure link requirements.
Choosing nameWithType and fullName in Microsoft Learn XRef Display Text records a distinct Microsoft Learn XRef authoring decision and consolidates tightly coupled syntax choices so the public guide stays useful without fragmenting one task into thin pages.
Avoiding HTML Tables in Microsoft Learn Markdown records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Avoiding Inline HTML in Microsoft Learn records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Encoding or Replacing Smart Quotes in Learn Markdown records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Escaping Special Characters in No-Loc Strings records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Escaping Underscores in Microsoft Learn Image Alt Text records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.
Finding and Preserving Microsoft Learn XRef UIDs records a distinct Microsoft Learn XRef authoring decision and consolidates tightly coupled syntax choices so the public guide stays useful without fragmenting one task into thin pages.
Limiting Alerts in Microsoft Learn Articles records a distinct Microsoft Learn authoring convention and keeps it scoped to that documentation environment rather than presenting it as a universal writing rule.