Page MenuHomePhabricator

Automatically prepended section titles in edit summaries should be stripped of formatting
Closed, DuplicatePublic

Description

When a user edits a page section with the 2017 wikitext editor, the section name is automatically prepended into the edit summary. For example, in this edit, /* Example */ was prepended into the edit summary, and the summary shows the link as "→‎Example".

However, when the section name contains bold or italic formatting, the prepended section name incorrectly includes the formatting, which results in a broken anchor link. For example, in this edit, /* ''Italicized'' and '''bolded''' example */ was prepended, and the edit summary displays the link as →‎''Italicized'' and '''bolded''' example, which takes the browser to the correct page but not the correct section.

To address this, the 2017 wikitext editor should strip bold and italic formatting from the automatically prepended section names in the edit summary when a user edits a page section. In the second example, the correct text to be prepended is /* Italicized and bolded example */ . This generates the link →‎Italicized and bolded example, which takes the browser to the correct section of the page.