Chad has uploaded a new change for review.
https://gerrit.wikimedia.org/r/115214
Change subject: Don't use parsed wikitext when dealing with CSS/JS pages
......................................................................
Don't use parsed wikitext when dealing with CSS/JS pages
They're bogus and don't work and lead to fun unpredictable
results when things like unclosed <h3> tags are used in
comments.
Ideally we could skip the parse entirely.
Bug: 61752
Change-Id: Ife47af3c5a769d5b4697105527f93a18425d8e58
---
M includes/BuildDocument/PageDataBuilder.php
1 file changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch
refs/changes/14/115214/1
diff --git a/includes/BuildDocument/PageDataBuilder.php
b/includes/BuildDocument/PageDataBuilder.php
index 38ba644..55dc78e 100644
--- a/includes/BuildDocument/PageDataBuilder.php
+++ b/includes/BuildDocument/PageDataBuilder.php
@@ -35,8 +35,16 @@
);
public function build() {
- foreach( $this->parseFuncs as $f ) {
- $this->$f();
+ switch ( $this->content->getModel() ) {
+ case CONTENT_MODEL_CSS:
+ case CONTENT_MODEL_JAVASCRIPT:
+ // Don't use parser output here. It's useless
and leads
+ // to weird results. See bug 61752
+ break;
+ default:
+ foreach( $this->parseFuncs as $f ) {
+ $this->$f();
+ }
}
return $this->doc;
--
To view, visit https://gerrit.wikimedia.org/r/115214
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife47af3c5a769d5b4697105527f93a18425d8e58
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits