Index: trunk/phase3/includes/Linker.php |
— | — | @@ -146,7 +146,7 @@ |
147 | 147 | * @param $target Title Can currently only be a Title, but this may |
148 | 148 | * change to support Images, literal URLs, etc. |
149 | 149 | * @param $text string The HTML contents of the <a> element, i.e., |
150 | | - * the link text. This is raw HTML and will not be escaped. If null, |
| 150 | + * the link text. This will be escaped. If null, |
151 | 151 | * defaults to the prefixed text of the Title; or if the Title is just a |
152 | 152 | * fragment, the contents of the fragment. |
153 | 153 | * @param $query array The query string to append to the URL |
— | — | @@ -287,9 +287,9 @@ |
288 | 288 | # If the target is just a fragment, with no title, we return the frag- |
289 | 289 | # ment text. Otherwise, we return the title text itself. |
290 | 290 | if( $target->getPrefixedText() === '' and $target->getFragment() !== '' ) { |
291 | | - return htmlspecialchars( $target->getFragment() ); |
| 291 | + return $target->getFragment(); |
292 | 292 | } |
293 | | - return htmlspecialchars( $target->getPrefixedText() ); |
| 293 | + return $target->getPrefixedText(); |
294 | 294 | } |
295 | 295 | |
296 | 296 | /** |
— | — | @@ -1039,13 +1039,12 @@ |
1040 | 1040 | * @private |
1041 | 1041 | */ |
1042 | 1042 | function userLink( $userId, $userText ) { |
1043 | | - $encName = htmlspecialchars( $userText ); |
1044 | 1043 | if( $userId == 0 ) { |
1045 | 1044 | $page = SpecialPage::getTitleFor( 'Contributions', $userText ); |
1046 | 1045 | } else { |
1047 | 1046 | $page = Title::makeTitle( NS_USER, $userText ); |
1048 | 1047 | } |
1049 | | - return $this->link( $page, $encName ); |
| 1048 | + return $this->link( $page, $userText ); |
1050 | 1049 | } |
1051 | 1050 | |
1052 | 1051 | /** |