tl;dr: Stop doing parseWikitext( getVar( 'old_wikitext' ) ).
Why: The "wikitext" variables may hold textual representation for every content model, but the native parsing makes sense only for actual wikitext. Furthermore, extensions can use the AbuseFilter-contentToString hook to transform the content from the native format. This is used in MediaWiki-extensions-Wikibase-Repo to strip boilerplate from JSON.
What:
- Construct derived content vars from a revision, not (pseudo)wikitext.
- Generalize the logic from 68ff66854377fb428aa65dff34ed95bb1a918296.
- Replace (and deprecate) code in LazyVariableComputer structured like parseWikitext( getVar( 'old_wikitext' ) ) with something more like someExtractor( getRevision( $params ) ).
Bugs:
- T65632: AbuseFilter *_links variables incorrect on item edits.
- T105325: [Bug] edit_diff_pst variable is broken on Wikidata
- T264104: Verify AbuseFilter code that claims to share and re-use ParserOutput from core
- T264562: old_wikitext and new_wikitext are computed differently for MassMessageListContent
Feature requests:
- T173663: Add more standard variables to delete action
- T320347: if action='move', then content (new_wikitext, old_wikitext) is not available
- T345896: Commons AbuseFilter new_wikitext parameter not available for action=upload
Related: