| Index: trunk/phase3/tests/parser/parserTests.txt |
| — | — | @@ -1911,7 +1911,7 @@ |
| 1912 | 1912 | !! input |
| 1913 | 1913 | [[Main Page]] |
| 1914 | 1914 | !! result |
| 1915 | | -<p><a href="/wiki/Main_Page">Main Page</a> |
| | 1915 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 1916 | 1916 | </p> |
| 1917 | 1917 | !! end |
| 1918 | 1918 | |
| — | — | @@ -1920,7 +1920,7 @@ |
| 1921 | 1921 | !! input |
| 1922 | 1922 | [[main Page]] |
| 1923 | 1923 | !! result |
| 1924 | | -<p><a href="/wiki/Main_Page">main Page</a> |
| | 1924 | +<p><a href="/wiki/Main_Page" title="Main Page">main Page</a> |
| 1925 | 1925 | </p> |
| 1926 | 1926 | !! end |
| 1927 | 1927 | |
| — | — | @@ -1974,7 +1974,7 @@ |
| 1975 | 1975 | !! input |
| 1976 | 1976 | xxx[[main Page]], xxx[[Main Page]], Xxx[[main Page]] XXX[[main Page]], XXX[[Main Page]] |
| 1977 | 1977 | !! result |
| 1978 | | -<p>xxx<a href="/wiki/Main_Page">main Page</a>, xxx<a href="/wiki/Main_Page">Main Page</a>, Xxx<a href="/wiki/Main_Page">main Page</a> XXX<a href="/wiki/Main_Page">main Page</a>, XXX<a href="/wiki/Main_Page">Main Page</a> |
| | 1978 | +<p>xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a>, xxx<a href="/wiki/Main_Page" title="Main Page">Main Page</a>, Xxx<a href="/wiki/Main_Page" title="Main Page">main Page</a> XXX<a href="/wiki/Main_Page" title="Main Page">main Page</a>, XXX<a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 1979 | 1979 | </p> |
| 1980 | 1980 | !! end |
| 1981 | 1981 | |
| — | — | @@ -1983,7 +1983,7 @@ |
| 1984 | 1984 | !! input |
| 1985 | 1985 | [[Main Page]]xxx, [[Main Page]]XXX, [[Main Page]]!!! |
| 1986 | 1986 | !! result |
| 1987 | | -<p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page">Main Page</a>XXX, <a href="/wiki/Main_Page">Main Page</a>!!! |
| | 1987 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Pagexxx</a>, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>XXX, <a href="/wiki/Main_Page" title="Main Page">Main Page</a>!!! |
| 1988 | 1988 | </p> |
| 1989 | 1989 | !! end |
| 1990 | 1990 | |
| — | — | @@ -2216,7 +2216,7 @@ |
| 2217 | 2217 | !!input |
| 2218 | 2218 | [[00]] |
| 2219 | 2219 | !!result |
| 2220 | | -<p><a href="/wiki/00">00</a> |
| | 2220 | +<p><a href="/wiki/00" title="00">00</a> |
| 2221 | 2221 | </p> |
| 2222 | 2222 | !!end |
| 2223 | 2223 | |
| — | — | @@ -2245,7 +2245,7 @@ |
| 2246 | 2246 | !! input |
| 2247 | 2247 | '''[[Main Page]]''' |
| 2248 | 2248 | !! result |
| 2249 | | -<p><b><a href="/wiki/Main_Page">Main Page</a></b> |
| | 2249 | +<p><b><a href="/wiki/Main_Page" title="Main Page">Main Page</a></b> |
| 2250 | 2250 | </p> |
| 2251 | 2251 | !! end |
| 2252 | 2252 | |
| — | — | @@ -2256,7 +2256,7 @@ |
| 2257 | 2257 | !! input |
| 2258 | 2258 | ''[[Main Page]]'' |
| 2259 | 2259 | !! result |
| 2260 | | -<p><i><a href="/wiki/Main_Page">Main Page</a></i> |
| | 2260 | +<p><i><a href="/wiki/Main_Page" title="Main Page">Main Page</a></i> |
| 2261 | 2261 | </p> |
| 2262 | 2262 | !! end |
| 2263 | 2263 | |
| — | — | @@ -2302,7 +2302,7 @@ |
| 2303 | 2303 | !! input |
| 2304 | 2304 | [[MeatBall:SoftSecurity]] |
| 2305 | 2305 | !! result |
| 2306 | | -<p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw">MeatBall:SoftSecurity</a> |
| | 2306 | +<p><a href="http://www.usemod.com/cgi-bin/mb.pl?SoftSecurity" class="extiw" title="meatball:SoftSecurity">MeatBall:SoftSecurity</a> |
| 2307 | 2307 | </p> |
| 2308 | 2308 | !! end |
| 2309 | 2309 | |
| — | — | @@ -2311,7 +2311,7 @@ |
| 2312 | 2312 | !! input |
| 2313 | 2313 | [[MeatBall:]] |
| 2314 | 2314 | !! result |
| 2315 | | -<p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw">MeatBall:</a> |
| | 2315 | +<p><a href="http://www.usemod.com/cgi-bin/mb.pl?" class="extiw" title="meatball:">MeatBall:</a> |
| 2316 | 2316 | </p> |
| 2317 | 2317 | !! end |
| 2318 | 2318 | |
| — | — | @@ -3220,7 +3220,7 @@ |
| 3221 | 3221 | !! input |
| 3222 | 3222 | [[{{linktest2}}]] |
| 3223 | 3223 | !! result |
| 3224 | | -<p><a href="/wiki/Main_Page">Main Page</a> |
| | 3224 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 3225 | 3225 | </p> |
| 3226 | 3226 | !! end |
| 3227 | 3227 | |
| — | — | @@ -3242,7 +3242,7 @@ |
| 3243 | 3243 | !! input |
| 3244 | 3244 | {{loop1}} |
| 3245 | 3245 | !! result |
| 3246 | | -<p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1">Template:Loop1</a></span> |
| | 3246 | +<p><span class="error">Template loop detected: <a href="/wiki/Template:Loop1" title="Template:Loop1">Template:Loop1</a></span> |
| 3247 | 3247 | </p> |
| 3248 | 3248 | !! end |
| 3249 | 3249 | |
| — | — | @@ -4065,7 +4065,7 @@ |
| 4066 | 4066 | !! input |
| 4067 | 4067 | [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]] |
| 4068 | 4068 | !! result |
| 4069 | | -<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page">Main Page</a></div></div></div> |
| | 4069 | +<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
| 4070 | 4070 | |
| 4071 | 4071 | !! end |
| 4072 | 4072 | |
| — | — | @@ -4074,7 +4074,7 @@ |
| 4075 | 4075 | !! input |
| 4076 | 4076 | [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]] |
| 4077 | 4077 | !! result |
| 4078 | | -<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page">Main Page</a></div></div></div> |
| | 4078 | +<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="Altitude" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" class="thumbimage" /></a> <div class="thumbcaption">This is a test image <a href="/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
| 4079 | 4079 | |
| 4080 | 4080 | !! end |
| 4081 | 4081 | |
| — | — | @@ -4274,7 +4274,7 @@ |
| 4275 | 4275 | !! input |
| 4276 | 4276 | [[Image:Barfoo.jpg]] |
| 4277 | 4277 | !! result |
| 4278 | | -<p><a href="/wiki/File:Barfoo.jpg">File:Barfoo.jpg</a> |
| | 4278 | +<p><a href="/wiki/File:Barfoo.jpg" title="File:Barfoo.jpg">File:Barfoo.jpg</a> |
| 4279 | 4279 | </p> |
| 4280 | 4280 | !! end |
| 4281 | 4281 | |
| — | — | @@ -4285,7 +4285,7 @@ |
| 4286 | 4286 | !! input |
| 4287 | 4287 | [[Image:Foobaz.jpg]] |
| 4288 | 4288 | !! result |
| 4289 | | -<p><a href="/wiki/File:Foobaz.jpg">File:Foobaz.jpg</a> |
| | 4289 | +<p><a href="/wiki/File:Foobaz.jpg" title="File:Foobaz.jpg">File:Foobaz.jpg</a> |
| 4290 | 4290 | </p> |
| 4291 | 4291 | !! end |
| 4292 | 4292 | |
| — | — | @@ -4355,7 +4355,7 @@ |
| 4356 | 4356 | !! input |
| 4357 | 4357 | [[:Category:MediaWiki User's Guide]] |
| 4358 | 4358 | !! result |
| 4359 | | -<p><a href="/wiki/Category:MediaWiki_User%27s_Guide">Category:MediaWiki User's Guide</a> |
| | 4359 | +<p><a href="/wiki/Category:MediaWiki_User%27s_Guide" title="Category:MediaWiki User's Guide">Category:MediaWiki User's Guide</a> |
| 4360 | 4360 | </p> |
| 4361 | 4361 | !! end |
| 4362 | 4362 | |
| — | — | @@ -5025,7 +5025,7 @@ |
| 5026 | 5026 | <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a> |
| 5027 | 5027 | <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a> |
| 5028 | 5028 | <a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a> |
| 5029 | | -<a href="/wiki/%D7%90%D6%B7">אַ</a> |
| | 5029 | +<a href="/wiki/%D7%90%D6%B7" title="אַ">אַ</a> |
| 5030 | 5030 | </p> |
| 5031 | 5031 | !! end |
| 5032 | 5032 | |
| — | — | @@ -5088,7 +5088,7 @@ |
| 5089 | 5089 | !! input |
| 5090 | 5090 | [[Main Page]]] |
| 5091 | 5091 | !! result |
| 5092 | | -<p><a href="/wiki/Main_Page">Main Page</a>] |
| | 5092 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a>] |
| 5093 | 5093 | </p> |
| 5094 | 5094 | !! end |
| 5095 | 5095 | |
| — | — | @@ -6291,7 +6291,7 @@ |
| 6292 | 6292 | !! result |
| 6293 | 6293 | <p><br /> |
| 6294 | 6294 | </p> |
| 6295 | | -<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx">Xyzzyx</a></td></tr></table> |
| | 6295 | +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> |
| 6296 | 6296 | |
| 6297 | 6297 | !! end |
| 6298 | 6298 | |
| — | — | @@ -6304,10 +6304,10 @@ |
| 6305 | 6305 | !! result |
| 6306 | 6306 | <p><br /> |
| 6307 | 6307 | </p> |
| 6308 | | -<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx">Xyzzyx</a></td></tr></table> |
| | 6308 | +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> |
| 6309 | 6309 | <p><br /> |
| 6310 | 6310 | </p> |
| 6311 | | -<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx">Xyzzyx</a></td></tr></table> |
| | 6311 | +<table border="0" id="mw-prefixindex-list-table"><tr><td><a href="/wiki/Xyzzyx" title="Xyzzyx">Xyzzyx</a></td></tr></table> |
| 6312 | 6312 | |
| 6313 | 6313 | !! end |
| 6314 | 6314 | |
| — | — | @@ -7202,7 +7202,7 @@ |
| 7203 | 7203 | !! input |
| 7204 | 7204 | {{Special:search}} |
| 7205 | 7205 | !! result |
| 7206 | | -<p><a href="/wiki/Special:Search">Special:Search</a> |
| | 7206 | +<p><a href="/wiki/Special:Search" title="Special:Search">Special:Search</a> |
| 7207 | 7207 | </p> |
| 7208 | 7208 | !! end |
| 7209 | 7209 | |
| — | — | @@ -7316,7 +7316,7 @@ |
| 7317 | 7317 | </gallery> |
| 7318 | 7318 | !! result |
| 7319 | 7319 | <ul class="gallery" style="max-width: 202px;_width: 202px;"> |
| 7320 | | - <li class='gallerycaption'>Foo <a href="/wiki/Main_Page">Main Page</a></li> |
| | 7320 | + <li class='gallerycaption'>Foo <a href="/wiki/Main_Page" title="Main Page">Main Page</a></li> |
| 7321 | 7321 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
| 7322 | 7322 | <div style="height: 70px;">Nonexistant.jpg</div> |
| 7323 | 7323 | <div class="gallerytext"> |
| — | — | @@ -7332,7 +7332,7 @@ |
| 7333 | 7333 | <li class="gallerybox" style="width: 95px"><div style="width: 95px"> |
| 7334 | 7334 | <div class="thumb" style="width: 90px;"><div style="margin:26px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="60" height="7" /></a></div></div> |
| 7335 | 7335 | <div class="gallerytext"> |
| 7336 | | -<p>some <b>caption</b> <a href="/wiki/Main_Page">Main Page</a> |
| | 7336 | +<p>some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 7337 | 7337 | </p> |
| 7338 | 7338 | </div> |
| 7339 | 7339 | </div></li> |
| — | — | @@ -7409,7 +7409,7 @@ |
| 7410 | 7410 | <div class="thumb" style="width: 150px;"><div style="margin:66px auto;"><a href="/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="120" height="14" /></a></div></div> |
| 7411 | 7411 | <div class="gallerytext"> |
| 7412 | 7412 | <p><a href="/wiki/File:Foobar.jpg" title="File:Foobar.jpg">Foobar.jpg</a><br /> |
| 7413 | | -some <b>caption</b> <a href="/wiki/Main_Page">Main Page</a> |
| | 7413 | +some <b>caption</b> <a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 7414 | 7414 | </p> |
| 7415 | 7415 | </div> |
| 7416 | 7416 | </div></li> |
| — | — | @@ -8035,7 +8035,7 @@ |
| 8036 | 8036 | !! input |
| 8037 | 8037 | [[Main Page]] can be written as [[Маин Паге]] same as [[Маин Паге]]. |
| 8038 | 8038 | !! result |
| 8039 | | -<p><a href="/wiki/Main_Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>. |
| | 8039 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> can be written as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a> same as <a href="/wiki/Main_Page" title="Main Page">Маин Паге</a>. |
| 8040 | 8040 | </p> |
| 8041 | 8041 | !!end |
| 8042 | 8042 | |
| — | — | @@ -8130,7 +8130,7 @@ |
| 8131 | 8131 | !! input |
| 8132 | 8132 | -{[[Main Page]]}- |
| 8133 | 8133 | !! result |
| 8134 | | -<p><a href="/wiki/Main_Page">Main Page</a> |
| | 8134 | +<p><a href="/wiki/Main_Page" title="Main Page">Main Page</a> |
| 8135 | 8135 | </p> |
| 8136 | 8136 | !! end |
| 8137 | 8137 | |
| — | — | @@ -8637,9 +8637,9 @@ |
| 8638 | 8638 | [[meatball:2]] |
| 8639 | 8639 | [[meatball:3]] |
| 8640 | 8640 | !! result |
| 8641 | | -<p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw">meatball:1</a> |
| 8642 | | -<a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw">meatball:2</a> |
| 8643 | | -<a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw">meatball:3</a> |
| | 8641 | +<p><a href="http://www.usemod.com/cgi-bin/mb.pl?1" class="extiw" title="meatball:1">meatball:1</a> |
| | 8642 | +<a href="http://www.usemod.com/cgi-bin/mb.pl?2" class="extiw" title="meatball:2">meatball:2</a> |
| | 8643 | +<a href="http://www.usemod.com/cgi-bin/mb.pl?3" class="extiw" title="meatball:3">meatball:3</a> |
| 8644 | 8644 | </p> |
| 8645 | 8645 | !! end |
| 8646 | 8646 | |
| — | — | @@ -8756,7 +8756,7 @@ |
| 8757 | 8757 | !! input |
| 8758 | 8758 | I like the [[Main Page]] a lot |
| 8759 | 8759 | !! result |
| 8760 | | -I like the <a href="/wiki/Main_Page">Main Page</a> a lot |
| | 8760 | +I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot |
| 8761 | 8761 | !!end |
| 8762 | 8762 | |
| 8763 | 8763 | !! test |
| — | — | @@ -9108,27 +9108,7 @@ |
| 9109 | 9109 | </p> |
| 9110 | 9110 | !! end |
| 9111 | 9111 | |
| 9112 | | -!! article |
| 9113 | | -A |
| 9114 | | -!! text |
| 9115 | | -A |
| 9116 | | -!! endarticle |
| 9117 | 9112 | |
| 9118 | | -!! article |
| 9119 | | -Ä |
| 9120 | | -!! text |
| 9121 | | -Ä |
| 9122 | | -!! endarticle |
| 9123 | | - |
| 9124 | | -!! test |
| 9125 | | -Bug#542 Link text shouldn't be duplicated in title attributes |
| 9126 | | -!! input |
| 9127 | | -[[A]] [[a]] [[Ä]] [[ä]] |
| 9128 | | -!! result |
| 9129 | | -<p><a href="/wiki/A">A</a> <a href="/wiki/A">a</a> <a href="/wiki/%C3%84">Ä</a> <a href="/wiki/%C3%84">ä</a> |
| 9130 | | -</p> |
| 9131 | | -!! end |
| 9132 | | - |
| 9133 | 9113 | TODO: |
| 9134 | 9114 | more images |
| 9135 | 9115 | more tables |
| Index: trunk/phase3/includes/Linker.php |
| — | — | @@ -201,7 +201,7 @@ |
| 202 | 202 | |
| 203 | 203 | $attribs = array_merge( |
| 204 | 204 | $attribs, |
| 205 | | - self::linkAttribs( $target, $customAttribs, $options, $text ) |
| | 205 | + self::linkAttribs( $target, $customAttribs, $options ) |
| 206 | 206 | ); |
| 207 | 207 | if ( is_null( $text ) ) { |
| 208 | 208 | $text = self::linkText( $target ); |
| — | — | @@ -258,7 +258,7 @@ |
| 259 | 259 | * |
| 260 | 260 | * @param $target Title |
| 261 | 261 | */ |
| 262 | | - private static function linkAttribs( $target, $attribs, $options, $linkText ) { |
| | 262 | + private static function linkAttribs( $target, $attribs, $options ) { |
| 263 | 263 | wfProfileIn( __METHOD__ ); |
| 264 | 264 | global $wgUser; |
| 265 | 265 | $defaults = array(); |
| — | — | @@ -289,16 +289,12 @@ |
| 290 | 290 | } |
| 291 | 291 | |
| 292 | 292 | # Get a default title attribute. |
| 293 | | - global $wgLang; |
| 294 | | - $known = in_array( 'known', $options ); |
| 295 | 293 | if ( $target->getPrefixedText() == '' ) { |
| 296 | 294 | # A link like [[#Foo]]. This used to mean an empty title |
| 297 | 295 | # attribute, but that's silly. Just don't output a title. |
| 298 | | - } elseif ( $known && |
| 299 | | - $wgLang->caseFold($linkText) !== $wgLang->caseFold($target->getPrefixedText() ) ) |
| 300 | | - { |
| | 296 | + } elseif ( in_array( 'known', $options ) ) { |
| 301 | 297 | $defaults['title'] = $target->getPrefixedText(); |
| 302 | | - } elseif ( !$known ) { |
| | 298 | + } else { |
| 303 | 299 | $defaults['title'] = wfMsg( 'red-link-title', $target->getPrefixedText() ); |
| 304 | 300 | } |
| 305 | 301 | |