Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -173,8 +173,13 @@ |
174 | 174 | # This was used for matching "$1" variables, but different uses of the feature will have |
175 | 175 | # different restrictions, which should be checked *after* the MagicWord has been matched, |
176 | 176 | # not here. - IMSoP |
177 | | - $escSyn = array_map( 'preg_quote', $this->mSynonyms ); |
| 177 | + |
| 178 | + $escSyn = array(); |
| 179 | + foreach ( $this->mSynonyms as $synonym ) |
| 180 | + // In case a magic word contains /, like that's going to happen;) |
| 181 | + $escSyn[] = preg_quote( $synonym, '/' ); |
178 | 182 | $this->mBaseRegex = implode( '|', $escSyn ); |
| 183 | + |
179 | 184 | $case = $this->mCaseSensitive ? '' : 'i'; |
180 | 185 | $this->mRegex = "/{$this->mBaseRegex}/{$case}"; |
181 | 186 | $this->mRegexStart = "/^(?:{$this->mBaseRegex})/{$case}"; |