Go to file
thiemowmde 16b0c3c00e Do not parse the outer <ol> as wikitext
With this change the <ol> is added after the inner list of <li> was
parsed as wikitext. In other words, the outer <ol> is now raw HTML
and not sanitized any more. This is fine because it's generated via
code. It doesn't contain any user input.

You might ask how it is possible to parse "invalid" HTML that
contains a sequence of <li> without the outer <ol>. This is fine
because the wikitext parser doesn't care about the nesting structure
of HTML elements. This is done later by Remex (Tidy). But Remex is
never called here. What we care about here is that the wikitext
parser sanitizes the individual HTML elements and their attributes.

The <ol> doesn't need sanitization.

This will make it possible to use reserved data attributes for
T196828. A bazillion unit and parser tests prove that this change
doesn't have any unwanted side-effects.

Bug: T196828
Bug: T239572
Change-Id: I0a9d419f48cad5ddb7251c8fdd2cf9506649436b
2024-06-05 10:15:29 +00:00
.phan Add DOM stubs; change namespace of imported Parsoid code to Cite\Parsoid 2024-01-17 16:04:30 -05:00
cypress Write e2e test for Cite-VisualEditor integration in Cypress 2024-01-30 14:48:14 +01:00
i18n Localisation updates from https://translatewiki.net. 2024-02-05 08:49:22 +01:00
modules Avoid creating a MWReferenceModel if not needed 2024-02-07 15:24:12 +01:00
src Do not parse the outer <ol> as wikitext 2024-06-05 10:15:29 +00:00
tests Merge "Rename ReferencesFormatter to ReferenceListFormatter" 2024-02-07 18:00:04 +00:00
.eslintrc.json [lint] Satisfy max-len rule 2024-01-30 12:18:52 +01:00
.gitignore Port Cite web test suite to Cypress 2024-01-17 11:45:04 +01:00
.gitreview Whoops, track not trace 2016-10-24 17:02:15 -07:00
.phpcs.xml More simple and consistent @covers and @license tags 2023-12-15 12:12:16 +01:00
.stylelintrc.json build: Update stylelint config 2023-05-30 20:18:01 +00:00
AUTHORS.txt Move Cite-specific settings from WikiEditor 2023-06-28 20:22:14 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/mediawiki-codesniffer to 22.0.0 2018-09-02 23:29:58 +00:00
composer.json build: Updating dependencies 2023-04-29 00:59:28 +00:00
COPYING.txt Add license details and give credit to more authors (based on git shortlog) 2014-07-26 16:16:47 -07:00
cypress.config.js Port Cite web test suite to Cypress 2024-01-17 11:45:04 +01:00
extension.json First tests for ve.dm.MWReferenceModel 2024-01-31 13:52:40 +01:00
Gruntfile.js Port Cite web test suite to Cypress 2024-01-17 11:45:04 +01:00
MIT-LICENSE.txt doc: Bump copyright year 2018-01-02 17:05:50 -08:00
package-lock.json Port Cite web test suite to Cypress 2024-01-17 11:45:04 +01:00
package.json Port Cite web test suite to Cypress 2024-01-17 11:45:04 +01:00
README.md Remove ApiQueryReferences support 2019-11-28 11:08:46 +01:00

Cite

The Cite extension provides a way for users to create references as footnotes to articles.

See https://www.mediawiki.org/wiki/Extension:Cite for detailed documentation.