Prevent crash on saving page with quote character.

- FIX: Prevent a crash when trying to save a page whose title contains a quote character.

Closes #8.
This commit is contained in:
Daniel Kraus
2016-11-05 07:31:18 +01:00
parent 95407cb41a
commit f9030dd7b1

View File

@ -113,7 +113,7 @@ class Extension {
// targets. This includes the current page. // targets. This includes the current page.
$blackList = str_replace( '_', ' ', $blackList = str_replace( '_', ' ',
'("' . implode( '", "',$wgLinkTitlesBlackList ) . '", "' . '("' . implode( '", "',$wgLinkTitlesBlackList ) . '", "' .
self::$currentTitle->getDbKey() . '")' ); addslashes( self::$currentTitle->getDbKey() ) . '")' );
// Build an SQL query and fetch all page titles ordered by length from // Build an SQL query and fetch all page titles ordered by length from
// shortest to longest. Only titles from 'normal' pages (namespace uid // shortest to longest. Only titles from 'normal' pages (namespace uid