From bb8fbba7b3971b9f720dc5b39887cc5bb12130b5 Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Fri, 27 May 2011 20:55:02 +0000 Subject: [PATCH] =?utf8?q?fix=20for=20Bug=20#93=20=E2=80=9Ctilde=20signatu?= =?utf8?q?res=20inside=20nowiki=20tags=20sometimes=20get=20expanded=20(~~~~)=E2=80=9D=20Patch?= =?utf8?q?=20from=20Brad=20Jorsch?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix for includeonly case. Hopefully fixing this ancient bug doesn't ‘cause people to cry --- includes/parser/Preprocessor_DOM.php | 3 +++ includes/parser/Preprocessor_Hash.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/includes/parser/Preprocessor_DOM.php b/includes/parser/Preprocessor_DOM.php index 2dd3efd27c..b08ed09cbf 100644 --- a/includes/parser/Preprocessor_DOM.php +++ b/includes/parser/Preprocessor_DOM.php @@ -185,6 +185,9 @@ class Preprocessor_DOM implements Preprocessor { if ( strpos( $text, '' ) !== false && strpos( $text, '' ) !== false ) { $enableOnlyinclude = true; } + } else if ( $this->parser->ot['wiki'] ) { + $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude', 'includeonly', '/includeonly' ); + $ignoredElements = array(); } else { $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude' ); $ignoredElements = array( 'includeonly' ); diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index b84b39deb7..7f175e58ad 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -144,6 +144,9 @@ class Preprocessor_Hash implements Preprocessor { if ( strpos( $text, '' ) !== false && strpos( $text, '' ) !== false ) { $enableOnlyinclude = true; } + } else if ( $this->parser->ot['wiki'] ) { + $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude', 'includeonly', '/includeonly' ); + $ignoredElements = array(); } else { $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude' ); $ignoredElements = array( 'includeonly' ); -- 2.20.1