Merge "Update outdated references to maintenance/ in documentation comments."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 6 Aug 2013 16:11:39 +0000 (16:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 6 Aug 2013 16:11:39 +0000 (16:11 +0000)
includes/Sanitizer.php
skins/CologneBlue.php
skins/Modern.php
skins/MonoBook.php
skins/Vector.php
tests/parser/parserTests.txt
tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js

index f3a5281..1432a8b 100644 (file)
@@ -448,7 +448,7 @@ class Sanitizer {
                                # $params: String between element name and >
                                # $brace: Ending '>' or '/>'
                                # $rest: Everything until the next element of $bits
-                               if ( preg_match( '!^(/?)(\\w+)([^>]*?)(/{0,1}>)([^<]*)$!', $x, $regs ) ) {
+                               if ( preg_match( '!^(/?)([^\\s/>]+)([^>]*?)(/{0,1}>)([^<]*)$!', $x, $regs ) ) {
                                        list( /* $qbar */, $slash, $t, $params, $brace, $rest ) = $regs;
                                } else {
                                        $slash = $t = $params = $brace = $rest = null;
index 5ae8843..0370e05 100644 (file)
@@ -290,8 +290,8 @@ class CologneBlueTemplate extends BaseTemplate {
                <div id="siteNotice"><?php echo $this->getSkin()->getSiteNotice() ?></div>
                <?php } ?>
                <h1 id="firstHeading" lang="<?php
-                       $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
-                       $this->html( 'pageLanguage' );
+                       $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+                       $this->text( 'pageLanguage' );
                ?>"><span dir="auto"><?php echo $this->data['title'] ?></span></h1>
                <?php if ( $this->translator->translate( 'tagline' ) ) { ?>
                <p class="tagline"><?php echo htmlspecialchars( $this->translator->translate( 'tagline' ) ) ?></p>
index 56acd7e..8d778cf 100644 (file)
@@ -67,8 +67,8 @@ class ModernTemplate extends MonoBookTemplate {
 
        <!-- heading -->
        <div id="mw_header"><h1 id="firstHeading" lang="<?php
-               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
-               $this->html( 'pageLanguage' );
+               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+               $this->text( 'pageLanguage' );
        ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1></div>
 
        <div id="mw_main">
index c7a3ffc..f905587 100644 (file)
@@ -79,8 +79,8 @@ class MonoBookTemplate extends BaseTemplate {
        <?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div><?php } ?>
 
        <h1 id="firstHeading" class="firstHeading" lang="<?php
-               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
-               $this->html( 'pageLanguage' );
+               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+               $this->text( 'pageLanguage' );
        ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
        <div id="bodyContent" class="mw-body">
                <div id="siteSub"><?php $this->msg( 'tagline' ) ?></div>
index 713ec8b..aba4791 100644 (file)
@@ -161,8 +161,8 @@ class VectorTemplate extends BaseTemplate {
                        <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
                        <?php } ?>
                        <h1 id="firstHeading" class="firstHeading" lang="<?php
-                               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getCode();
-                               $this->html( 'pageLanguage' );
+                               $this->data['pageLanguage'] = $this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
+                               $this->text( 'pageLanguage' );
                        ?>"><span dir="auto"><?php $this->html( 'title' ) ?></span></h1>
                        <div id="bodyContent">
                                <?php if ( $this->data['isarticle'] ) { ?>
index 6a1993d..bdafad8 100644 (file)
@@ -874,6 +874,43 @@ Non-html5 tags should be accepted
 </p>
 !! end
 
+# <strike> is HTML4, <s> is HTML4/5.
+!! test
+<s> or <strike> for strikethrough
+!! input
+<strike>strike</strike>
+
+<s>s</s>
+!! result
+<p><strike>strike</strike>
+</p><p><s>s</s>
+</p>
+!! end
+
+!! test
+Non-word characters don't terminate tag names (bug 17663, 40670, 52022)
+!! input
+<b→> doesn't work! </b>
+
+<bä> doesn't work! </b>
+
+<boo> works fine </b>
+
+<s.foo>foo</s>
+
+<s.foo>s.foo</s.foo>
+
+<sub-ID#1>
+!! result
+<p>&lt;b→&gt; doesn't work! &lt;/b&gt;
+</p><p>&lt;bä&gt; doesn't work! &lt;/b&gt;
+</p><p>&lt;boo&gt; works fine &lt;/b&gt;
+</p><p>&lt;s.foo&gt;foo&lt;/s&gt;
+</p><p>&lt;s.foo&gt;s.foo&lt;/s.foo&gt;
+</p><p>&lt;sub-ID#1&gt;
+</p>
+!! end
+
 ###
 ### Special characters
 ###
@@ -16129,12 +16166,10 @@ a>b
 !! end
 
 
-# This fails in the PHP parser (see bug 40670,
-# https://bugzilla.wikimedia.org/show_bug.cgi?id=40670), so disabled for it.
+# This was a bug in the PHP parser (see bug 17663 and its dups,
+# https://bugzilla.wikimedia.org/show_bug.cgi?id=17663)
 !! test
 Tag names followed by punctuation should not be recognized as tags
-!! options
-parsoid
 !! input
 <s.ome> text
 !! result
index cc2e067..468e74c 100644 (file)
                assert.assertTrue( $content.is( ':hidden' ), 'after collapsing: content is hidden' );
        } );
 
+       QUnit.test( 'mw-made-collapsible data added', 1, function ( assert ) {
+               var $collapsible;
+               $collapsible = prepareCollapsible(
+                       '<div>' + loremIpsum + '</div>'
+               );
+               assert.equal( $collapsible.data( 'mw-made-collapsible' ), true, 'mw-made-collapsible data present' );
+       } );
+
+       QUnit.test( 'mw-collapsible added when missing', 1, function ( assert ) {
+               var $collapsible;
+               $collapsible = prepareCollapsible(
+                       '<div>' + loremIpsum + '</div>'
+               );
+               assert.assertTrue( $collapsible.hasClass( 'mw-collapsible' ), 'mw-collapsible class present' );
+       } );
+
+       QUnit.test( 'mw-collapsed added when missing', 1, function ( assert ) {
+               var $collapsible;
+               $collapsible = prepareCollapsible(
+                       '<div>' + loremIpsum + '</div>',
+                       { collapsed: true }
+               );
+               assert.assertTrue( $collapsible.hasClass( 'mw-collapsed' ), 'mw-collapsed class present' );
+       } );
+
        QUnit.asyncTest( 'initial collapse (mw-collapsed class)', 2, function ( assert ) {
                var $collapsible, $content;
                $collapsible = prepareCollapsible(