mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Fix parse wikitext fragment in paction
wikitext.
Whenever wikitext content is inserted by the hook `EditFormPreloadText`, it is always parsed to visual editor markup even when in wikitext mode. Bug: T206838 Change-Id: I56f0fb9d4e1519af01155c35d4d0068076de4600
This commit is contained in:
parent
bedbd5b152
commit
124addddaf
|
@ -368,7 +368,7 @@ class ApiVisualEditor extends ApiBase {
|
|||
} else {
|
||||
$content = '';
|
||||
Hooks::run( 'EditFormPreloadText', [ &$content, &$title ] );
|
||||
if ( $content !== '' ) {
|
||||
if ( $content !== '' && $params['paction'] !== 'wikitext' ) {
|
||||
$content = $this->parseWikitextFragment( $title, $content, true );
|
||||
}
|
||||
if ( $content === '' && !empty( $params['preload'] ) ) {
|
||||
|
|
Loading…
Reference in a new issue