Index: trunk/extensions/Translate/MessageChecks.php |
— | — | @@ -27,15 +27,15 @@ |
28 | 28 | } |
29 | 29 | |
30 | 30 | if ( count($values = self::checkBalance( $message )) ) { |
31 | | - $warnings[] = wfMsgExt( self::MSG . 'balance', 'parse', implode( ', ', $values ) ); |
| 31 | + $warnings[] = wfMsgExt( self::MSG . 'balance', 'parse', wfEscapeWikiText( implode( ', ', $values ) ) ); |
32 | 32 | } |
33 | 33 | |
34 | 34 | if ( count($values = self::checkLinks( $message )) ) { |
35 | | - $warnings[] = wfMsgExt( self::MSG . 'links', 'parse', implode( ', ', $values ) ); |
| 35 | + $warnings[] = wfMsgExt( self::MSG . 'links', 'parse', wfEscapeWikiText( implode( ', ', $values ) ) ); |
36 | 36 | } |
37 | 37 | |
38 | 38 | if ( count($values = self::checkXHTML( $message )) ) { |
39 | | - $warnings[] = wfMsgExt( self::MSG . 'xhtml', 'parse', implode( ', ', $values ) ); |
| 39 | + $warnings[] = wfMsgExt( self::MSG . 'xhtml', 'parse', htmlspecialchars( implode( ', ', $values ) ) ); |
40 | 40 | } |
41 | 41 | |
42 | 42 | if ( self::checkPlural( $message ) ) { |
— | — | @@ -107,6 +107,7 @@ |
108 | 108 | for ($i = 0; $i < count($matches[0]); $i++ ) { |
109 | 109 | if ( preg_match( '/({{ns:)?special(}})?:.*/sDui', $matches[1][$i] ) ) continue; |
110 | 110 | if ( preg_match( '/{{mediawiki:.*}}/sDui', $matches[1][$i] ) ) continue; |
| 111 | + if ( preg_match( '/user([ _]talk)?:.*/sDui', $matches[1][$i] ) ) continue; |
111 | 112 | |
112 | 113 | $links[] = "[[{$matches[1][$i]}|{$matches[2][$i]}]]"; |
113 | 114 | } |
— | — | @@ -136,7 +137,7 @@ |
137 | 138 | $matches = array(); |
138 | 139 | preg_match_all( $wrong, $translation, $matches, PREG_PATTERN_ORDER); |
139 | 140 | foreach ( $matches[0] as $wrongMatch ) { |
140 | | - $wrongTags[$wrongMatch] = htmlspecialchars( "$wrongMatch → $correct" ); |
| 141 | + $wrongTags[$wrongMatch] = "$wrongMatch → $correct"; |
141 | 142 | } |
142 | 143 | } |
143 | 144 | return $wrongTags; |