mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-12-19 10:20:38 +00:00
Merge "SECURITY: Improve regular expression performance" into REL1_39
This commit is contained in:
commit
dd8489deee
|
@ -173,7 +173,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
|
||||||
|
|
||||||
foreach ( $lines as $line ) {
|
foreach ( $lines as $line ) {
|
||||||
$m = [];
|
$m = [];
|
||||||
if ( preg_match( '/^==+ *([^*:\s|]+?)\s*==+\s*$/', $line, $m ) ) {
|
if ( preg_match( '/^==+ *([^*:\s|]+)\s*(?<!=)==+\s*$/', $line, $m ) ) {
|
||||||
$section = $m[1];
|
$section = $m[1];
|
||||||
} else {
|
} else {
|
||||||
$gadget = $this->newFromDefinition( $line, $section );
|
$gadget = $this->newFromDefinition( $line, $section );
|
||||||
|
|
Loading…
Reference in a new issue