Manual:$wgFragmentMode/zh

该设置选项决定章节 ID 的编码方式

详情
该选项应为一个数组，此数组可以包含 1 或 2 个元素，这些元素应该是下列字符串的其中一个：


 * ' ' - 该值指定编码方式为具有最小转义需求的现代 HTML5 样式编码. 它允许在许多浏览器的地址栏中显示 Unicode 字符（如中文）.
 * ' ' - 该值指定编码方式为原有的 MediaWiki 格式的编码. 例如 啤酒 编码为 .E5.95.A4.E9.85.92.
 * ' ' 该值指定编码方式为被废弃的 模式. 除了从该模式迁移之外，请勿将其用于任何其他用途（请参阅下文）.

该数组第 1 个元素指定编码 ID 的主要模式. 这是用户会在点击章节链接（如 ）时会在地址栏看到的编码方式.

可选的第 2 个元素指定一个兼容模式，在迁移时很有用. If present, it will direct MediaWiki to add empty to every section with its id attribute set to fallback encoded title so that links using the previous encoding would still work.

Example: you want to migrate your wiki from 'legacy' to 'html5'. On the first step, set this variable to [ 'legacy', 'html5' ]. After a while, when all caches (parser, HTTP, etc.) contain only pages generated with this setting, flip the value to [ 'html5', 'legacy' ]. This will result in all internal links being generated in the new encoding while old links (both external and cached internal) will still work. After a long time, you might want to ditch backwards compatibility and set it to [ 'html5' ]. After all, pages get edited, breaking incoming links no matter which fragment mode is used.