r80473 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80472‎ | r80473 | r80474 >
Date:23:12, 17 January 2011
Author:platonides
Status:deferred
Tags:
Comment:
Follow up r80461. In some cases the closing tags for internal tags were not recognised.
Modified paths:
  • /trunk/extensions/NativePreprocessor/tag_util.c (modified) (history)
  • /trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/phpunit/includes/parser/PreprocessorTest.php
@@ -35,6 +35,8 @@
3636 array( "<foo> <gallery></gallery>", "<root>&lt;foo&gt; <ext><name>gallery</name><attr></attr><inner></inner><close>&lt;/gallery&gt;</close></ext></root>" ),
3737 array( "<foo> <gallery><gallery></gallery>", "<root>&lt;foo&gt; <ext><name>gallery</name><attr></attr><inner>&lt;gallery&gt;</inner><close>&lt;/gallery&gt;</close></ext></root>" ),
3838 array( "<noinclude> Foo bar </noinclude>", "<root><ignore>&lt;noinclude&gt;</ignore> Foo bar <ignore>&lt;/noinclude&gt;</ignore></root>" ),
 39+ array( "<noinclude>\n{{Foo}}\n</noinclude>", "<root><ignore>&lt;noinclude&gt;</ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore>&lt;/noinclude&gt;</ignore></root>" ),
 40+ array( "<noinclude>\n{{Foo}}\n</noinclude>\n", "<root><ignore>&lt;noinclude&gt;</ignore>\n<template lineStart=\"1\"><title>Foo</title></template>\n<ignore>&lt;/noinclude&gt;</ignore>\n</root>" ),
3941 array( "<gallery>foo bar", "<root><ext><name>gallery</name><attr></attr><inner>foo bar</inner></ext></root>" ),
4042 array( "<gallery></gallery</gallery>", "<root><ext><name>gallery</name><attr></attr><inner>&lt;/gallery</inner><close>&lt;/gallery&gt;</close></ext></root>" ),
4143 array( "=== Foo === ", "<root><h level=\"3\" i=\"1\">=== Foo === </h></root>" ),
Index: trunk/extensions/NativePreprocessor/tag_util.c
@@ -79,6 +79,11 @@
8080 if ( string[0] == '/' ) {
8181 string++;
8282 string_len--;
 83+
 84+ if ( i ) {
 85+ memmove( lowername, lowername + 1, i - 1 );
 86+ i--;
 87+ }
8388 }
8489 continue;
8590 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r80461Follow up r80376. Added missing file FORMAT....platonides19:54, 17 January 2011

Status & tagging log