Index: trunk/extensions/SemanticMediaWiki/specials/SMWAdmin/SMW_SpecialSMWAdmin.php |
— | — | @@ -118,8 +118,8 @@ |
119 | 119 | $html .= |
120 | 120 | '<form name="refreshwiki" action="" method="POST">' . |
121 | 121 | '<input type="hidden" name="action" value="refreshstore" />' . |
122 | | - '<input type="submit" value="' . wfMsg( 'smw_smwadmin_datarefreshstop' ) . '"/> ' . |
123 | | - ' <input type="checkbox" name="rfsure" value="stop"/> ' . wfMsg( 'smw_smwadmin_datarefreshstopconfirm' ) . |
| 122 | + '<input type="submit" value="' . htmlspecialchars( wfMsg( 'smw_smwadmin_datarefreshstop' ) ) . '" /> ' . |
| 123 | + ' <input type="checkbox" name="rfsure" value="stop"/> ' . htmlspecialchars( wfMsg( 'smw_smwadmin_datarefreshstopconfirm' ) ) . |
124 | 124 | '</form>' . "\n"; |
125 | 125 | } |
126 | 126 | } elseif ( $smwgAdminRefreshStore ) { |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValue.php |
— | — | @@ -610,7 +610,7 @@ |
611 | 611 | } |
612 | 612 | |
613 | 613 | if ( count( $extralinks ) > 0 ) { |
614 | | - $result .= smwfEncodeMessages( $extralinks, 'info', ', <!--br-->' ); |
| 614 | + $result .= smwfEncodeMessages( $extralinks, 'info', ', <!--br-->', false ); |
615 | 615 | } |
616 | 616 | |
617 | 617 | return $result; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -224,17 +224,18 @@ |
225 | 225 | * @param array $messages |
226 | 226 | * @param string $icon Acts like an enum. Callers must ensure safety, since this value is used directly in the output. |
227 | 227 | * @param string $seperator |
| 228 | + * @param boolean $escape Should the messages be escaped or not (ie when they already are) |
228 | 229 | * |
229 | 230 | * @return string |
230 | 231 | */ |
231 | | -function smwfEncodeMessages( array $messages, $icon = 'warning', $seperator = ' <!--br-->' ) { |
| 232 | +function smwfEncodeMessages( array $messages, $icon = 'warning', $seperator = ' <!--br-->', $escape = true ) { |
232 | 233 | if ( count( $messages ) > 0 ) { |
233 | 234 | SMWOutputs::requireHeadItem( SMW_HEADER_TOOLTIP ); |
234 | | - foreach( $messages as &$message ) { |
235 | | - $message = htmlspecialchars( $message ); |
| 235 | + if ( $escape ) { |
| 236 | + $messages = array_map( 'htmlspecialchars', $messages ); |
236 | 237 | } |
237 | | - $messageString = implode( $seperator, $messages ); |
238 | | - return '<span class="smwttpersist"><span class="smwtticon">' . $icon . '.png</span><span class="smwttcontent">' . $messageString . '</span> </span>'; |
| 238 | + return '<span class="smwttpersist"><span class="smwtticon">' . htmlspecialchars( $icon ) |
| 239 | + . '.png</span><span class="smwttcontent">' . implode( $seperator, $messages ) . '</span> </span>'; |
239 | 240 | } else { |
240 | 241 | return ''; |
241 | 242 | } |