* (bug 14646) Fix some double-escaping of HTML in feed output
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 6 Jul 2008 20:19:04 +0000 (20:19 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 6 Jul 2008 20:19:04 +0000 (20:19 +0000)
Log entry action text was being double-escaped by running HTML through the comment parser.
Log action text is now output as straight HTML.

The link for long diffs was also coming out wrong on English Wikipedia due to overloading of messages.
Switched from 'differenes' (which is a label text which had gotten turned into an HTML link there) to 'showdiff', which is a plaintext button label. (Might consider making it a separate message which is a little more descriptive.)

RELEASE-NOTES
includes/FeedUtils.php
includes/LogPage.php

index c5d7544..6758804 100644 (file)
@@ -413,6 +413,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14088) Excessively long block expiry times are rejected as invalid,
   keeps the log page from being distorted.
 * (bug 14708) Emulate INSERT...IGNORE with standard SQL for Postgres backend.
+* (bug 14646) Fix some double-escaping of HTML in feed output
+
 
 === API changes in 1.13 ===
 
index 4412a14..aa784c0 100644 (file)
@@ -59,10 +59,11 @@ class FeedUtils {
 
                $skin = $wgUser->getSkin();
                # log enties
-               if( $actiontext ) {
-                       $comment = "$actiontext $comment";
-               }
-               $completeText = '<p>' . $skin->formatComment( $comment ) . "</p>\n";
+               $completeText = '<p>' . implode( ' ',
+                       array_filter(
+                               array(
+                                       $actiontext,
+                                       $skin->formatComment( $comment ) ) ) ) . "</p>\n";
 
                //NOTE: Check permissions for anonymous users, not current user.
                //      No "privileged" version should end up in the cache.
@@ -92,7 +93,7 @@ class FeedUtils {
                                        $diffText = '<a href="' .
                                                $diffLink .
                                                '">' .
-                                               htmlspecialchars( wfMsgForContent( 'difference' ) ) .
+                                               htmlspecialchars( wfMsgForContent( 'showdiff' ) ) .
                                                '</a>';
                                } elseif ( $diffText === false ) {
                                        // Error in diff engine, probably a missing revision
index fcc245a..58e486f 100644 (file)
@@ -143,6 +143,7 @@ class LogPage {
 
        /**
         * @static
+        * @return HTML string
         */
        static function actionText( $type, $action, $title = NULL, $skin = NULL, $params = array(), $filterWikilinks=false ) {
                global $wgLang, $wgContLang, $wgLogActions;