Page MenuHomePhabricator

TOC processing should strip contents of <style> tags
Closed, ResolvedPublic

Description

If a <style> tag is present in a section header, e.g. from a <templatestyles> tag, the parser is stripping the tag but leaving the content in place.

Original report

A severe bug from using TemplateStyles in inline templates: https://ru.wikipedia.org/?oldid=93704275

Event Timeline

Anomie renamed this task from TemplateStyles should be ignored in table of contents to TOC processing should strip contents of <style> tags.Jul 2 2018, 2:30 PM
Anomie claimed this task.
Anomie edited projects, added MediaWiki-Parser; removed MediaWiki-Interface.
Anomie updated the task description. (Show Details)

Change 443440 had a related patch set uploaded (by Anomie; owner: Anomie):
[mediawiki/core@master] Parser: Remove style and script tags' content from TOC

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

ggellerman triaged this task as Medium priority.Jul 3 2018, 6:09 PM
ggellerman moved this task from Backlog to Doing on the TemplateStyles board.

Change 443440 merged by jenkins-bot:
[mediawiki/core@master] Parser: Remove style and script tags' content from TOC

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

This should be deployed to Wikimedia sites with 1.32.0-wmf.13 or later.

Change 465454 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Sync parserTests with core

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

Change 465454 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Sync parserTests with core

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

Change 465460 had a related patch set uploaded (by Arlolra; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Strip <style> / <script> tags in TOC

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

Change 465460 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Strip <style> / <script> tags in TOC

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

Change 468668 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Add a test for <script> in TOC

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

Change 468668 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Add a test for <script> in TOC

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