From f9030dd7b1aaa07bb99e9a61110eeb32e56836b0 Mon Sep 17 00:00:00 2001 From: Daniel Kraus Date: Sat, 5 Nov 2016 07:31:18 +0100 Subject: [PATCH] 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. --- includes/LinkTitles_Extension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/LinkTitles_Extension.php b/includes/LinkTitles_Extension.php index e0f26eb..8471397 100644 --- a/includes/LinkTitles_Extension.php +++ b/includes/LinkTitles_Extension.php @@ -113,7 +113,7 @@ class Extension { // targets. This includes the current page. $blackList = str_replace( '_', ' ', '("' . implode( '", "',$wgLinkTitlesBlackList ) . '", "' . - self::$currentTitle->getDbKey() . '")' ); + addslashes( self::$currentTitle->getDbKey() ) . '")' ); // Build an SQL query and fetch all page titles ordered by length from // shortest to longest. Only titles from 'normal' pages (namespace uid