Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7419317
HardenNFC.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
637 B
Referenced Files
None
Subscribers
None
HardenNFC.php
View Options
<?php
namespace
MediaWiki\OutputTransform\Stages
;
use
MediaWiki\OutputTransform\ContentTextTransformStage
;
use
MediaWiki\Parser\ParserOptions
;
use
MediaWiki\Parser\ParserOutput
;
use
MediaWiki\Parser\Sanitizer
;
/**
* Hardens the output against NFC normalization (T387130).
* @internal
*/
class
HardenNFC
extends
ContentTextTransformStage
{
public
function
shouldRun
(
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
$options
=
[]
):
bool
{
return
true
;
}
protected
function
transformText
(
string
$text
,
ParserOutput
$po
,
?
ParserOptions
$popts
,
array
&
$options
):
string
{
return
Sanitizer
::
escapeCombiningChar
(
$text
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 04:23 (1 d, 5 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b4/d6/31ba8927ad2ca74a27265f366034
Default Alt Text
HardenNFC.php (637 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment