aboutsummaryrefslogtreecommitdiffstats
path: root/includes/parser/PPFrame_Hash.php
diff options
context:
space:
mode:
authorSubramanya Sastry <ssastry@wikimedia.org>2022-07-21 19:47:09 -0500
committerSubramanya Sastry <ssastry@wikimedia.org>2022-08-20 20:56:54 -0500
commit98b3ddd7c7bb382f84ce72b3992652ba49601f92 (patch)
tree80069cb78d27ee9edbdc8199f488ed58839f58fd /includes/parser/PPFrame_Hash.php
parent7efe7727a043c3e538d3d7ad858b17c701e09c2f (diff)
downloadmediawikicore-98b3ddd7c7bb382f84ce72b3992652ba49601f92.tar.gz
mediawikicore-98b3ddd7c7bb382f84ce72b3992652ba49601f92.zip
Added Parsoid support for nowiki stripping in args of {{#tag:ext|...}}
* This patch relies on extensions setting a flag in their Parsoid ext. config indicating that a specific tag handler needs nowikis stripped from #tag arguments. In the #tag parser function implementation, Parsoid's SiteConfig is looked up to see if nowiki needs to be stripped. * This need not be limited to nowikis, but to support extension use in {{#tag:ext|...}} more generally, we would need to either (a) implement the #tag parser function in Parsoid natively; OR (b) find a way to call Parsoid from extensionSubstitution Soln (a) needs Parsoid to support parser functions natively. If this general support becomes necessary, a later patch can generalize this appropriately. Bug: T272939 Bug: T299103 Depends-On: I6a653889afd42fefb61daefd8ac842107dce8759 Depends-On: I56043e0cb7d355a3f0d08e429bb1dbba6acb4fba Change-Id: I614153af67b5a14f33b7dfc04bd00dd9e03557d0
Diffstat (limited to 'includes/parser/PPFrame_Hash.php')
-rw-r--r--includes/parser/PPFrame_Hash.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/parser/PPFrame_Hash.php b/includes/parser/PPFrame_Hash.php
index 4c455183a34d..d85a251b345a 100644
--- a/includes/parser/PPFrame_Hash.php
+++ b/includes/parser/PPFrame_Hash.php
@@ -350,7 +350,8 @@ class PPFrame_Hash implements PPFrame {
}
$out .= $s;
} else {
- $out .= $this->parser->extensionSubstitution( $bits, $this );
+ $out .= $this->parser->extensionSubstitution( $bits, $this,
+ (bool)( $flags & PPFrame::PROCESS_NOWIKI ) );
}
} elseif ( $contextName === 'h' ) {
# Heading