Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -578,13 +578,13 @@ |
579 | 579 | if ( $rc_type != RC_NEW ) { |
580 | 580 | $curLink = $this->message['cur']; |
581 | 581 | } else { |
582 | | - $curUrl = wfUrlencode( $rc->getTitle()->getLinkUrl( $querycur ) ); |
| 582 | + $curUrl = htmlspecialchars( $rc->getTitle()->getLinkUrl( $querycur ) ); |
583 | 583 | $curLink = "<a href=\"$curUrl\" tabindex=\"{$baseRC->counter}\">{$this->message['cur']}</a>"; |
584 | 584 | } |
585 | 585 | $diffLink = $this->message['diff']; |
586 | 586 | } else { |
587 | | - $diffUrl = wfUrlencode( $rc->getTitle()->getLinkUrl( $querydiff ) ); |
588 | | - $curUrl = wfUrlencode( $rc->getTitle()->getLinkUrl( $querycur ) ); |
| 587 | + $diffUrl = htmlspecialchars( $rc->getTitle()->getLinkUrl( $querydiff ) ); |
| 588 | + $curUrl = htmlspecialchars( $rc->getTitle()->getLinkUrl( $querycur ) ); |
589 | 589 | $diffLink = "<a href=\"$diffUrl\" tabindex=\"{$baseRC->counter}\">{$this->message['diff']}</a>"; |
590 | 590 | $curLink = "<a href=\"$curUrl\" tabindex=\"{$baseRC->counter}\">{$this->message['cur']}</a>"; |
591 | 591 | } |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -854,6 +854,9 @@ |
855 | 855 | * there's a fragment but the prefixed text is empty, we just return a link |
856 | 856 | * to the fragment. |
857 | 857 | * |
| 858 | + * The result obviously should not be URL-escaped, but does need to be |
| 859 | + * HTML-escaped if it's being output in HTML. |
| 860 | + * |
858 | 861 | * @param $query \type{\arrayof{\string}} An associative array of key => value pairs for the |
859 | 862 | * query string. Keys and values will be escaped. |
860 | 863 | * @param $variant \type{\string} Language variant of URL (for sr, zh..). Ignored |