The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingReturn
Change-Id: I8fdffa68dfd23e17b623042761057f8c952f0dce
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment
Change-Id: Ic998e3f2a791bf987f826d6dd0e92a8de24be5b7
Also fold a unit test into the normal function since we don't have to
have two valid responses based on css-sanitizer version.
Change-Id: I107c8b911781924ce9cc0730257243b9cb1592a6
wikimedia/css-sanitizer provides a real CSS parser, which should be
safer than poking at things with regular expressions.
Instead of the strange hybrid model that tried to both process inline
CSS and save CSS when the template is saved, it now looks for
<templatestyles src="Title" /> during the parse to do all the
transclusion of styles.
The output method is "<style> tags in the body", pending someone
implementing T160563.
It now also registers a "sanitized-css" content model, which should pick
up the CSS syntax highlighting and will validate the submitted CSS on
submit and prevent a save if it's not valid.
This patch also takes advantage of LGPL-2.x § 3 to relicense the
extension as GPL-2.0+, although at this point none of the LGPL code
remains anyway.
Bug: T133408
Bug: T136054
Bug: T135788
Bug: T135789
Change-Id: I993e6f18d32a43aac8398743133d227b05133bbd
Depends-On: If4eb5bf71f94fa366ec4eddb6964e8f4df6b824a
* Add phpdoc comments
* Rename some variables to be a bit more clear for new readers
* Break up render() to make things more readable and reduce cyclomatic
complexity
Change-Id: Iceeb1f6eb09b61efe6b81f359d28741f54fe88ad
* Add phpdoc comments
* Update method signatures to reduce duplication
* Rename some variables to be a bit more clear for new readers
* Try to keep lines <80 chars (my own personal peeve I know)
* Use === instead of ==
* Fix a few other small code style issues
Change-Id: I52594fd34646af53fc91ec470fcf1d0be9c2b156
Change the ConfigRegistry setting in extension.json to the normal
GlobalVarConfig factor rather than a local wrapper.
Change-Id: I9a1b2869ee13fab59f628e4d5c83188a96062c42
Properties listed in $wgTemplateStylesPropertyBlacklist, or
those that contain function-like values not listed in
$wgTemplateStylesFunctionWhitelist cause the containing
declaration to be omitted from rendering entirely.
Additionally, rule selectors are unconditionally prepended
with '#mw-content-text' so that they cannot be applied to
UI elements outside the actual page content.
Change-Id: Id3d7dff465363d0163e4a5a1f31e770b4b0a67e2
Add some comments and tweak the formatting of the test suite. Some
things that were hardcoded can now be tweaked by the
parse->render->verify tests if desired.
Change-Id: I36abc9fa2b9971d6b92d5714c4583dea6ad26b88
Test the roundtrip on a collection of correct and pathological
stylesheets to ascertain whether the parse is behaving as
expected.
Bug: T483
Change-Id: I484cc856b5696c1fa6265769320f79853365e1d6