Page MenuHomePhabricator

Deletion log message can be parsed as wikitext in EditPage recreation confirmation
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • create a page
  • start editing it
  • in another tab, delete it with a comment that includes </nowiki> (example: this '''is not''' bold </nowiki> but '''this''' is)
  • save the edit

What happens?:
MediaWiki tells you that the page was deleted since you started editing it, and asks you to confirm that you want to recreate it. It includes the log message, and anything after the </nowiki> will be parsed as wikitext, for example:

this '''is not''' bold but this is </nowiki>

What should have happened instead?:
The log message should not be parsed as wikitext even if it happens to contain </nowiki>. Log messages are plain text.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
MediaWiki core master

Event Timeline

Change 768268 had a related patch set uploaded (by Lucas Werkmeister; author: Lucas Werkmeister):

[mediawiki/core@master] EditPage: Avoid parsing wikitext in comment

https://gerrit.wikimedia.org/r/768268

Log messages are plain text.

No, they aren’t. Log messages cannot contain formatting like bold and italics, but they can contain a limited wikitext syntax, for example internal links and HTML/XML character entities (&amp;, &#32; etc.). You can use CommentFormatter to properly format log messages.

Change 768268 merged by jenkins-bot:

[mediawiki/core@master] EditPage: Avoid parsing wikitext in comment

https://gerrit.wikimedia.org/r/768268