Rits has uploaded a new change for review.
https://gerrit.wikimedia.org/r/193081
Change subject: T36801 Changed Function applyDiffStyle uses regexes which do
not detect CSS classes appropriately
......................................................................
T36801 Changed Function applyDiffStyle uses regexes which do not detect CSS
classes appropriately
Change-Id: Ie801eb34a8902f82a587d03fa7f08a63485a02a3
---
M includes/FeedUtils.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/81/193081/1
diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php
index 15fdbc5..45e2dd4 100644
--- a/includes/FeedUtils.php
+++ b/includes/FeedUtils.php
@@ -255,8 +255,8 @@
);
foreach ( $styles as $class => $style ) {
- $text = preg_replace(
"/(<[^>]+)class=(['\"])$class\\2([^>]*>)/",
- "\\1style=\"$style\"\\3", $text );
+ $text = preg_replace(
"/(<[^>]+)class=(['\"])(.*?)$class(| .*?)\2([^>]*>)/",
+ "\\1style=\"$style\"\\5", $text );
}
return $text;
--
To view, visit https://gerrit.wikimedia.org/r/193081
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie801eb34a8902f82a587d03fa7f08a63485a02a3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Rits <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits