* (bug 5493) Id translation for special pages
* Added skinname and style path parameters to CBT version of MonoBook
* Include subversion revision number in Special:Version if available
+* (bug 5344) Fix regression that broke slashes in extension tag parameters
== Compatibility ==
}
if( $tag == STRIP_COMMENTS ) {
- $start = '/<!--()()/';
+ $start = '/<!--()/';
$end = '/-->/';
} else {
- $start = "/<$tag(\\s+[^\\/>]*|\\s*)(\\/?)>/i";
+ $start = "/<$tag(\\s+[^>]*|\\s*\/?)>/i";
$end = "/<\\/$tag\\s*>/i";
}
while ( '' != $text ) {
$p = preg_split( $start, $text, 2, PREG_SPLIT_DELIM_CAPTURE );
$stripped .= $p[0];
- if( count( $p ) < 4 ) {
+ if( count( $p ) < 3 ) {
break;
}
$attributes = $p[1];
- $empty = $p[2];
- $inside = $p[3];
+ $inside = $p[2];
+
+ // If $attributes ends with '/', we have an empty element tag, <tag />
+ if( $tag != STRIP_COMMENTS && substr( $attributes, -1 ) == '/' ) {
+ $attributes = substr( $attributes, 0, -1);
+ $empty = '/';
+ } else {
+ $empty = '';
+ }
$marker = $rnd . sprintf('%08X', $n++);
$stripped .= $marker;
!! end
+!! test
+Parser hook: empty input using terminated empty elements (space before)
+!! input
+<tag />
+!! result
+<pre>
+NULL
+array(0) {
+}
+</pre>
+
+!! end
+
!! test
Parser hook: basic input
!! input
!! end
+!! test
+Parser hook: argument containing a forward slash (bug 5344)
+!! input
+<tag filename='/tmp/bla'></tag>
+!! result
+<pre>
+string(0) ""
+array(1) {
+ ["filename"]=>
+ string(8) "/tmp/bla"
+}
+</pre>
+
+!! end
+
!! test
Parser hook: empty input using terminated empty elements (bug 2374)
!! input