Index: trunk/phase3/includes/Linker.php |
— | — | @@ -89,7 +89,7 @@ |
90 | 90 | */ |
91 | 91 | private function getLinkAttributesInternal( $title, $class, $classDefault = false ) { |
92 | 92 | $title = htmlspecialchars( $title ); |
93 | | - if( $class === '' and $classDefault !== false ) { |
| 93 | + if ( $class === '' and $classDefault !== false ) { |
94 | 94 | # FIXME: Parameter defaults the hard way! We should just have |
95 | 95 | # $class = 'external' or whatever as the default in the externally- |
96 | 96 | # exposed functions, not $class = ''. |
— | — | @@ -97,10 +97,12 @@ |
98 | 98 | } |
99 | 99 | $class = htmlspecialchars( $class ); |
100 | 100 | $r = ''; |
101 | | - if( $class !== '' ) { |
| 101 | + if ( $class != '' ) { |
102 | 102 | $r .= " class=\"$class\""; |
103 | 103 | } |
104 | | - $r .= " title=\"$title\""; |
| 104 | + if ( $title != '') { |
| 105 | + $r .= " title=\"$title\""; |
| 106 | + } |
105 | 107 | return $r; |
106 | 108 | } |
107 | 109 | |
Index: trunk/phase3/includes/MediaTransformOutput.php |
— | — | @@ -80,17 +80,19 @@ |
81 | 81 | } |
82 | 82 | } |
83 | 83 | |
84 | | - function getDescLinkAttribs( $alt = false, $params = '' ) { |
| 84 | + function getDescLinkAttribs( $title = null, $params = '' ) { |
85 | 85 | $query = $this->page ? ( 'page=' . urlencode( $this->page ) ) : ''; |
86 | 86 | if( $params ) { |
87 | 87 | $query .= $query ? '&'.$params : $params; |
88 | 88 | } |
89 | | - $title = $this->file->getTitle(); |
90 | | - return array( |
| 89 | + $attribs = array( |
91 | 90 | 'href' => $this->file->getTitle()->getLocalURL( $query ), |
92 | 91 | 'class' => 'image', |
93 | | - 'title' => $alt |
94 | 92 | ); |
| 93 | + if ( $title ) { |
| 94 | + $attribs['title'] = $title; |
| 95 | + } |
| 96 | + return $attribs; |
95 | 97 | } |
96 | 98 | } |
97 | 99 | |
— | — | @@ -148,22 +150,22 @@ |
149 | 151 | } |
150 | 152 | |
151 | 153 | $alt = empty( $options['alt'] ) ? '' : $options['alt']; |
152 | | - # Note: if title is empty and alt is not, make the title empty, don't |
153 | | - # use alt; only use alt if title is not set |
154 | | - $title = !isset( $options['title'] ) ? $alt : $options['title']; |
155 | | - $query = empty($options['desc-query']) ? '' : $options['desc-query']; |
156 | 154 | |
| 155 | + $query = empty( $options['desc-query'] ) ? '' : $options['desc-query']; |
| 156 | + |
157 | 157 | if ( !empty( $options['custom-url-link'] ) ) { |
158 | 158 | $linkAttribs = array( 'href' => $options['custom-url-link'] ); |
159 | | - if ( $alt ) { |
160 | | - $linkAttribs['title'] = $alt; |
| 159 | + if ( !empty( $options['title'] ) ) { |
| 160 | + $linkAttribs['title'] = $options['title']; |
161 | 161 | } |
162 | 162 | } elseif ( !empty( $options['custom-title-link'] ) ) { |
163 | 163 | $title = $options['custom-title-link']; |
164 | | - $linkAttribs = array( 'href' => $title->getLinkUrl(), |
165 | | - 'title' => $alt ); |
| 164 | + $linkAttribs = array( |
| 165 | + 'href' => $title->getLinkUrl(), |
| 166 | + 'title' => empty( $options['title'] ) ? $title->getFullText() : $options['title'] |
| 167 | + ); |
166 | 168 | } elseif ( !empty( $options['desc-link'] ) ) { |
167 | | - $linkAttribs = $this->getDescLinkAttribs( $title, $query ); |
| 169 | + $linkAttribs = $this->getDescLinkAttribs( empty( $options['title'] ) ? null : $options['title'], $query ); |
168 | 170 | } elseif ( !empty( $options['file-link'] ) ) { |
169 | 171 | $linkAttribs = array( 'href' => $this->file->getURL() ); |
170 | 172 | } else { |
Index: trunk/phase3/maintenance/parserTests.txt |
— | — | @@ -2198,7 +2198,7 @@ |
2199 | 2199 | !! input |
2200 | 2200 | PMID 1234 |
2201 | 2201 | !! result |
2202 | | -<p><a href="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234" class="external" title="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=pubmed&dopt=Abstract&list_uids=1234">PMID 1234</a> |
| 2202 | +<p><a href="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract" class="external" title="http://www.ncbi.nlm.nih.gov/pubmed/1234?dopt=Abstract">PMID 1234</a> |
2203 | 2203 | </p> |
2204 | 2204 | !! end |
2205 | 2205 | |
— | — | @@ -3130,7 +3130,7 @@ |
3131 | 3131 | !! input |
3132 | 3132 | [[Image:foobar.jpg]] |
3133 | 3133 | !! result |
3134 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3134 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3135 | 3135 | </p> |
3136 | 3136 | !! end |
3137 | 3137 | |
— | — | @@ -3139,7 +3139,7 @@ |
3140 | 3140 | !! input |
3141 | 3141 | [[Image:foobar.jpg|right]] |
3142 | 3142 | !! result |
3143 | | -<div class="floatright"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div> |
| 3143 | +<div class="floatright"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div> |
3144 | 3144 | |
3145 | 3145 | !! end |
3146 | 3146 | |
— | — | @@ -3148,7 +3148,7 @@ |
3149 | 3149 | !! input |
3150 | 3150 | [[File:foobar.jpg]] |
3151 | 3151 | !! result |
3152 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="File:foobar.jpg"><img alt="File:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3152 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3153 | 3153 | </p> |
3154 | 3154 | !! end |
3155 | 3155 | |
— | — | @@ -3166,7 +3166,7 @@ |
3167 | 3167 | !! input |
3168 | 3168 | [[Image:foobar.jpg|link=Target page]] |
3169 | 3169 | !! result |
3170 | | -<p><a href="https://www.mediawiki.org/wiki/Target_page" title="Target page"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3170 | +<p><a href="https://www.mediawiki.org/wiki/Target_page" title="Target page"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3171 | 3171 | </p> |
3172 | 3172 | !! end |
3173 | 3173 | |
— | — | @@ -3175,7 +3175,7 @@ |
3176 | 3176 | !! input |
3177 | 3177 | [[Image:foobar.jpg|link=http://example.com/]] |
3178 | 3178 | !! result |
3179 | | -<p><a href="http://example.com/"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3179 | +<p><a href="http://example.com/"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3180 | 3180 | </p> |
3181 | 3181 | !! end |
3182 | 3182 | |
— | — | @@ -3184,7 +3184,7 @@ |
3185 | 3185 | !! input |
3186 | 3186 | [[Image:foobar.jpg|link=]] |
3187 | 3187 | !! result |
3188 | | -<p><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /> |
| 3188 | +<p><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /> |
3189 | 3189 | </p> |
3190 | 3190 | !! end |
3191 | 3191 | |
— | — | @@ -3213,7 +3213,7 @@ |
3214 | 3214 | !! input |
3215 | 3215 | [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]]] |
3216 | 3216 | !! result |
3217 | | -<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="This is a test image Main Page"><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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
| 3217 | +<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="https://www.mediawiki.org/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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
3218 | 3218 | |
3219 | 3219 | !! end |
3220 | 3220 | |
— | — | @@ -3222,7 +3222,7 @@ |
3223 | 3223 | !! input |
3224 | 3224 | [[Image:Foobar.jpg|frame|left|This is a test image [[Main Page]]|alt=Altitude]] |
3225 | 3225 | !! result |
3226 | | -<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="This is a test image Main Page"><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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
| 3226 | +<div class="thumb tleft"><div class="thumbinner" style="width:1943px;"><a href="https://www.mediawiki.org/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="https://www.mediawiki.org/wiki/Main_Page" title="Main Page">Main Page</a></div></div></div> |
3227 | 3227 | |
3228 | 3228 | !! end |
3229 | 3229 | |
— | — | @@ -3240,7 +3240,7 @@ |
3241 | 3241 | !! input |
3242 | 3242 | [[Image:Foobar.jpg|alt=testing '''bold''' in alt]] |
3243 | 3243 | !! result |
3244 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3244 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="testing bold in alt" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3245 | 3245 | </p> |
3246 | 3246 | !! end |
3247 | 3247 | |
— | — | @@ -3269,7 +3269,7 @@ |
3270 | 3270 | !! input |
3271 | 3271 | [[Image:foobar.jpg|thumb|http://example.com]] |
3272 | 3272 | !! result |
3273 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a></div></div></div> |
| 3273 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a></div></div></div> |
3274 | 3274 | |
3275 | 3275 | !! end |
3276 | 3276 | |
— | — | @@ -3278,7 +3278,7 @@ |
3279 | 3279 | !! input |
3280 | 3280 | [[Image:foobar.jpg|thumb|http://example.com|alt=Alteration]] |
3281 | 3281 | !! result |
3282 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="http://example.com"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a></div></div></div> |
| 3282 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Alteration" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a></div></div></div> |
3283 | 3283 | |
3284 | 3284 | !! end |
3285 | 3285 | |
— | — | @@ -3287,7 +3287,7 @@ |
3288 | 3288 | !! input |
3289 | 3289 | [[Image:foobar.jpg|thumb|ISBN 1235467890]] |
3290 | 3290 | !! result |
3291 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="ISBN 1235467890"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="https://www.mediawiki.org/wiki/Special:BookSources/1235467890" class="internal">ISBN 1235467890</a></div></div></div> |
| 3291 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><a href="https://www.mediawiki.org/wiki/Special:BookSources/1235467890" class="internal">ISBN 1235467890</a></div></div></div> |
3292 | 3292 | |
3293 | 3293 | !! end |
3294 | 3294 | |
— | — | @@ -3296,7 +3296,7 @@ |
3297 | 3297 | !! input |
3298 | 3298 | [[Image:foobar.jpg|thumb|This is RFC 12354]] |
3299 | 3299 | !! result |
3300 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="This is RFC 12354"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a href="http://tools.ietf.org/html/rfc12354" class="external" title="http://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div> |
| 3300 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is <a href="http://tools.ietf.org/html/rfc12354" class="external" title="http://tools.ietf.org/html/rfc12354">RFC 12354</a></div></div></div> |
3301 | 3301 | |
3302 | 3302 | !! end |
3303 | 3303 | |
— | — | @@ -3305,7 +3305,7 @@ |
3306 | 3306 | !! input |
3307 | 3307 | [[Image:foobar.jpg|thumb|Please mailto:nobody@example.com]] |
3308 | 3308 | !! result |
3309 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Please mailto:nobody@example.com"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a href="mailto:nobody@example.com" class="external free" title="mailto:nobody@example.com" rel="nofollow">mailto:nobody@example.com</a></div></div></div> |
| 3309 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>Please <a href="mailto:nobody@example.com" class="external free" title="mailto:nobody@example.com" rel="nofollow">mailto:nobody@example.com</a></div></div></div> |
3310 | 3310 | |
3311 | 3311 | !! end |
3312 | 3312 | |
— | — | @@ -3315,7 +3315,7 @@ |
3316 | 3316 | !! input |
3317 | 3317 | [[Image:foobar.jpg|thumb|<math>2+2</math>]] |
3318 | 3318 | !! result |
3319 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="<math>2+2</math>"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><math>2+2</math></div></div></div> |
| 3319 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><math>2+2</math></div></div></div> |
3320 | 3320 | |
3321 | 3321 | !! end |
3322 | 3322 | |
— | — | @@ -3326,7 +3326,7 @@ |
3327 | 3327 | !! input |
3328 | 3328 | [[Image:foobar.jpg|thumb|<math>2+2</math>]] |
3329 | 3329 | !! result |
3330 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="2 + 2"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><span class="texhtml">2 + 2</span></div></div></div> |
| 3330 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div><span class="texhtml">2 + 2</span></div></div></div> |
3331 | 3331 | |
3332 | 3332 | !! end |
3333 | 3333 | |
— | — | @@ -3399,7 +3399,7 @@ |
3400 | 3400 | !! input |
3401 | 3401 | [[Image:Foobar.jpg|thumb|This is a caption with another [[Image:icon.png|image]] inside it!]] |
3402 | 3402 | !! result |
3403 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="This is a caption with another File:Icon.png inside it!"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">File:Icon.png</a> inside it!</div></div></div> |
| 3403 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This is a caption with another <a href="https://www.mediawiki.org/index.php?title=Special:Upload&wpDestFile=Icon.png" class="new" title="File:Icon.png">File:Icon.png</a> inside it!</div></div></div> |
3404 | 3404 | |
3405 | 3405 | !! end |
3406 | 3406 | |
— | — | @@ -3419,7 +3419,7 @@ |
3420 | 3420 | !! input |
3421 | 3421 | [[Image:Foobar.jpg|thumb|200px|This caption has [irc://example.net irc] and [https://example.com Secure] ext links in it.]] |
3422 | 3422 | !! result |
3423 | | -<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="This caption has irc and Secure ext links in it."><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a href="irc://example.net" class="external text" title="irc://example.net" rel="nofollow">irc</a> and <a href="https://example.com" class="external text" title="https://example.com" rel="nofollow">Secure</a> ext links in it.</div></div></div> |
| 3423 | +<div class="thumb tright"><div class="thumbinner" style="width:202px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/200px-Foobar.jpg" width="200" height="23" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>This caption has <a href="irc://example.net" class="external text" title="irc://example.net" rel="nofollow">irc</a> and <a href="https://example.com" class="external text" title="https://example.com" rel="nofollow">Secure</a> ext links in it.</div></div></div> |
3424 | 3424 | |
3425 | 3425 | !! end |
3426 | 3426 | |
— | — | @@ -3822,7 +3822,7 @@ |
3823 | 3823 | !! input |
3824 | 3824 | http://example.com [[Image:foobar.jpg]] |
3825 | 3825 | !! result |
3826 | | -<p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> <a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3826 | +<p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a> <a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3827 | 3827 | </p> |
3828 | 3828 | !!end |
3829 | 3829 | |
— | — | @@ -3831,7 +3831,7 @@ |
3832 | 3832 | !! input |
3833 | 3833 | http://example.com[[Image:foobar.jpg]] |
3834 | 3834 | !! result |
3835 | | -<p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Image:foobar.jpg"><img alt="Image:foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
| 3835 | +<p><a href="http://example.com" class="external free" title="http://example.com" rel="nofollow">http://example.com</a><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a> |
3836 | 3836 | </p> |
3837 | 3837 | !!end |
3838 | 3838 | |
— | — | @@ -6339,7 +6339,7 @@ |
6340 | 6340 | !! input |
6341 | 6341 | [[Image:foobar.jpg|centre]] |
6342 | 6342 | !! result |
6343 | | -<div class="center"><div class="floatnone"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div> |
| 6343 | +<div class="center"><div class="floatnone"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div></div> |
6344 | 6344 | |
6345 | 6345 | !!end |
6346 | 6346 | |
— | — | @@ -6348,7 +6348,7 @@ |
6349 | 6349 | !! input |
6350 | 6350 | [[Image:foobar.jpg|none]] |
6351 | 6351 | !! result |
6352 | | -<div class="floatnone"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div> |
| 6352 | +<div class="floatnone"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/3/3a/Foobar.jpg" width="1941" height="220" /></a></div> |
6353 | 6353 | |
6354 | 6354 | !!end |
6355 | 6355 | |
— | — | @@ -6357,7 +6357,7 @@ |
6358 | 6358 | !! input |
6359 | 6359 | [[Image:foobar.jpg|640x480px]] |
6360 | 6360 | !! result |
6361 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
| 6361 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
6362 | 6362 | </p> |
6363 | 6363 | !!end |
6364 | 6364 | |
— | — | @@ -6366,7 +6366,7 @@ |
6367 | 6367 | !! input |
6368 | 6368 | [[Image:foobar.jpg|640px]] |
6369 | 6369 | !! result |
6370 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
| 6370 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
6371 | 6371 | </p> |
6372 | 6372 | !!end |
6373 | 6373 | |
— | — | @@ -6375,7 +6375,7 @@ |
6376 | 6376 | !! input |
6377 | 6377 | [[Image:foobar.jpg|640px ]] |
6378 | 6378 | !! result |
6379 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
| 6379 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
6380 | 6380 | </p> |
6381 | 6381 | !!end |
6382 | 6382 | |
— | — | @@ -6384,7 +6384,7 @@ |
6385 | 6385 | !! input |
6386 | 6386 | [[Image:foobar.jpg| 640px]] |
6387 | 6387 | !! result |
6388 | | -<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="Foobar.jpg"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
| 6388 | +<p><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="Foobar.jpg" src="http://example.com/images/thumb/3/3a/Foobar.jpg/640px-Foobar.jpg" width="640" height="73" /></a> |
6389 | 6389 | </p> |
6390 | 6390 | !!end |
6391 | 6391 | |
— | — | @@ -6422,7 +6422,7 @@ |
6423 | 6423 | !! input |
6424 | 6424 | [[image:Foobar.jpg|thumb|An [http://test/?param1=|left|¶m2=|x external] URL]] |
6425 | 6425 | !! result |
6426 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="An external URL"><img alt="An external URL" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=|left|&param2=|x" class="external text" title="http://test/?param1=|left|&param2=|x" rel="nofollow">external</a> URL</div></div></div> |
| 6426 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="An external URL" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>An <a href="http://test/?param1=|left|&param2=|x" class="external text" title="http://test/?param1=|left|&param2=|x" rel="nofollow">external</a> URL</div></div></div> |
6427 | 6427 | |
6428 | 6428 | !!end |
6429 | 6429 | |
— | — | @@ -7227,7 +7227,7 @@ |
7228 | 7228 | !! input |
7229 | 7229 | [[Image:Foobar.jpg|thumb|http://x|hello]] |
7230 | 7230 | !! result |
7231 | | -<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image" title="hello"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div> |
| 7231 | +<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="image"><img alt="" src="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg" width="180" height="20" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="https://www.mediawiki.org/wiki/File:Foobar.jpg" class="internal" title="Enlarge"><img src="/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>hello</div></div></div> |
7232 | 7232 | |
7233 | 7233 | !! end |
7234 | 7234 | |