http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88997

Revision: 88997
Author:   mah
Date:     2011-05-27 20:55:02 +0000 (Fri, 27 May 2011)
Log Message:
-----------
fix for Bug #93 ?\226?\128?\156tilde signatures inside nowiki tags sometimes 
get expanded (<includeonly><nowiki>~~~~</nowiki></includeonly>)?\226?\128?\157
Patch from Brad Jorsch

Fix for includeonly case.  Hopefully fixing this ancient bug doesn't
?\226?\128?\152cause people to cry

Modified Paths:
--------------
    trunk/phase3/includes/parser/Preprocessor_DOM.php
    trunk/phase3/includes/parser/Preprocessor_Hash.php

Modified: trunk/phase3/includes/parser/Preprocessor_DOM.php
===================================================================
--- trunk/phase3/includes/parser/Preprocessor_DOM.php   2011-05-27 20:47:04 UTC 
(rev 88996)
+++ trunk/phase3/includes/parser/Preprocessor_DOM.php   2011-05-27 20:55:02 UTC 
(rev 88997)
@@ -185,6 +185,9 @@
                        if ( strpos( $text, '<onlyinclude>' ) !== false && 
strpos( $text, '</onlyinclude>' ) !== 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' );

Modified: trunk/phase3/includes/parser/Preprocessor_Hash.php
===================================================================
--- trunk/phase3/includes/parser/Preprocessor_Hash.php  2011-05-27 20:47:04 UTC 
(rev 88996)
+++ trunk/phase3/includes/parser/Preprocessor_Hash.php  2011-05-27 20:55:02 UTC 
(rev 88997)
@@ -144,6 +144,9 @@
                        if ( strpos( $text, '<onlyinclude>' ) !== false && 
strpos( $text, '</onlyinclude>' ) !== 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' );


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to