jenkins-bot has submitted this change and it was merged. Change subject: Pass scrubWikitext=true to Parsoid ......................................................................
Pass scrubWikitext=true to Parsoid But only in html2wt mode. Bug: T96949 Change-Id: I59dfc317193e9c43c8cf21fdddf82482e325b8ad --- M includes/Parsoid/Utils.php 1 file changed, 9 insertions(+), 4 deletions(-) Approvals: Matthias Mullie: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Parsoid/Utils.php b/includes/Parsoid/Utils.php index 7901d31..7f90f94 100644 --- a/includes/Parsoid/Utils.php +++ b/includes/Parsoid/Utils.php @@ -89,14 +89,19 @@ throw new WikitextException( 'Unknown source format: ' . $from, 'process-wikitext' ); } + $params = array( + $from => $content, + 'body' => true, + ); + if ( $from === 'html' ) { + $params['scrubWikitext'] = 'true'; + } + $request = \MWHttpRequest::factory( $parsoidURL . '/' . $parsoidPrefix . '/' . $title->getPrefixedDBkey(), array( 'method' => 'POST', - 'postData' => wfArrayToCgi( array( - $from => $content, - 'body' => true, - ) ), + 'postData' => wfArrayToCgi( $params ), 'timeout' => $parsoidTimeout, 'connectTimeout' => 'default', ) -- To view, visit https://gerrit.wikimedia.org/r/206186 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I59dfc317193e9c43c8cf21fdddf82482e325b8ad Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Flow Gerrit-Branch: master Gerrit-Owner: Catrope <roan.katt...@gmail.com> Gerrit-Reviewer: Matthias Mullie <mmul...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits