Purge Sanitizer proxying from ParsoidExtensionAPI

Sanitizer is heavily used by extensions and we decided to let
extensions directly access it.

So, stop proxying those methods from ParsoidExtensionAPI.

Change-Id: I5ff285bf33733878135e2091d53ae12f7340c8fc
This commit is contained in:
Subramanya Sastry 2020-12-09 22:23:38 -06:00 committed by jenkins-bot
parent e0322afd84
commit 07bcfd9add

View file

@ -8,6 +8,7 @@ use DOMElement;
use DOMNode;
use stdClass;
use Wikimedia\Parsoid\Core\DomSourceRange;
use Wikimedia\Parsoid\Core\Sanitizer;
use Wikimedia\Parsoid\Ext\DOMDataUtils;
use Wikimedia\Parsoid\Ext\DOMUtils;
use Wikimedia\Parsoid\Ext\ExtensionTagHandler;
@ -179,8 +180,8 @@ class References extends ExtensionTagHandler {
// (i.e. '&' === '&'), which is done:
// in PHP: Sanitizer#decodeTagAttributes and
// in Parsoid: ExtensionHandler#normalizeExtOptions
$refName = $extApi->sanitizeHTMLId( $refName );
$followName = $extApi->sanitizeHTMLId( $followName );
$refName = Sanitizer::escapeIdForAttribute( $refName );
$followName = Sanitizer::escapeIdForAttribute( $followName );
// Add ref-index linkback
$linkBack = $doc->createElement( 'sup' );