Writing & StyleStyle guide

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.

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.

  1. 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.

Related guides

Writing & Style

Avoiding HTML Tables in Microsoft Learn Markdown

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.

Writing & Style

Avoiding Inline HTML in Microsoft Learn

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.

Writing & Style

Encoding or Replacing Smart Quotes in Learn Markdown

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.

Writing & Style

Escaping Special Characters in No-Loc Strings

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.

Writing & Style

Escaping Underscores in Microsoft Learn Image Alt Text

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.

Writing & Style

Finding and Preserving Microsoft Learn XRef UIDs

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.

Writing & Style

Limiting Alerts in Microsoft Learn Articles

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.

Explore the topic