Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312093

Change subject: Parser: Allow `<s>` and `<strike>` in table of contents
......................................................................

Parser: Allow `<s>` and `<strike>` in table of contents

Bug: T35715
Change-Id: Iec6a05e3e6bb622f477e6ebeb57e9f65da5f22bd
---
M includes/parser/Parser.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/312093/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 7c18798..c4149b0 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -4138,12 +4138,13 @@
                        # * <b> (r105284)
                        # * <bdi> (bug 72884)
                        # * <span dir="rtl"> and <span dir="ltr"> (bug 35167)
+                       # * <s> and <strike> (T35715)
                        # We strip any parameter from accepted tags (second 
regex), except dir="rtl|ltr" from <span>,
                        # to allow setting directionality in toc items.
                        $tocline = preg_replace(
                                [
-                                       '#<(?!/?(span|sup|sub|bdi|i|b)(?: 
[^>]*)?>).*?>#',
-                                       '#<(/?(?:span(?: 
dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b))(?: .*?)?>#'
+                                       
'#<(?!/?(span|sup|sub|bdi|i|b|s|strike)(?: [^>]*)?>).*?>#',
+                                       '#<(/?(?:span(?: 
dir="(?:rtl|ltr)")?|sup|sub|bdi|i|b|s|strike))(?: .*?)?>#'
                                ],
                                [ '', '<$1>' ],
                                $safeHeadline

-- 
To view, visit https://gerrit.wikimedia.org/r/312093
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec6a05e3e6bb622f477e6ebeb57e9f65da5f22bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to