* Escape attribute values
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 1 Apr 2009 08:51:54 +0000 (08:51 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 1 Apr 2009 08:51:54 +0000 (08:51 +0000)
* Document getRowClass()

includes/Pager.php

index e3ba497..1078a74 100644 (file)
@@ -746,7 +746,7 @@ abstract class TablePager extends IndexPager {
        }
 
        function formatRow( $row ) {
-               $rowClass = $this->getRowClass( $row );
+               $rowClass = htmlspecialchars( $this->getRowClass( $row ) );
                $s = "<tr class=\"$rowClass\">\n";
                $fieldNames = $this->getFieldNames();
                $this->mCurrentRow = $row;  # In case formatValue needs to know
@@ -763,6 +763,10 @@ abstract class TablePager extends IndexPager {
                return $s;
        }
 
+       /**
+        * Get a class name to be applied to the given row.
+        * @param object $row The database result row
+        */
        function getRowClass($row) {
                return '';
        }