Commit graph

6 commits

Author SHA1 Message Date
Kunal Mehta 9a1a06b77d Move PHP classes into includes/ directory
Change-Id: Ibc03a6c298ec3bf3bbfa435033095546db6fc5f0
2018-02-05 18:18:01 -08:00
jenkins-bot 7b025c809a Merge "Cache processed stylesheets during the parse" 2018-02-02 02:45:31 +00:00
Gergő Tisza 34a7cf83fa
Temporary feature flag for disabling style output
Bug: T176268
Change-Id: I6eae1ac80131b9f219c5a6ab3b63c1cc4fe1590f
2018-01-18 17:54:07 -08:00
Brad Jorsch 9964009346 Cache processed stylesheets during the parse
If we've already processed a stylesheet once, there's no point in
processing it again.

Change-Id: I83f7aab82cc7674037974b0de43ccae6c77ff39f
2017-11-30 14:05:31 -05:00
Kunal Mehta 119ccaf5fc build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
The following sniffs now pass and were enabled:
* MediaWiki.Commenting.FunctionComment.MissingReturn

Change-Id: I8fdffa68dfd23e17b623042761057f8c952f0dce
2017-07-23 00:39:22 -07:00
Brad Jorsch b301a30abf Use wikimedia/css-sanitizer, and rewrite the hooking
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
2017-06-07 15:14:09 +00:00