Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5938469
HardenNFC.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
666 B
Referenced Files
None
Subscribers
None
HardenNFC.php
View Options
<?php
declare
(
strict_types
=
1
);
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
Oct 2 2026, 16:15 (6 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/67/a5bbcecbadcc6e8af27332230622
Default Alt Text
HardenNFC.php (666 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment