Soeren.oldag has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/221083

Change subject: Fixed escaping issue.
......................................................................

Fixed escaping issue.

Change-Id: I3f0e15835c8393d3633f27752841969d392ac68a
---
M specials/SpecialConstraintReport.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints
 refs/changes/83/221083/1

diff --git a/specials/SpecialConstraintReport.php 
b/specials/SpecialConstraintReport.php
index 1ca137a..778e65c 100755
--- a/specials/SpecialConstraintReport.php
+++ b/specials/SpecialConstraintReport.php
@@ -2,6 +2,8 @@
 
 namespace WikibaseQuality\ConstraintReport\Specials;
 
+use UnexpectedValueException;
+use InvalidArgumentException;
 use JobQueueGroup;
 use SpecialPage;
 use ValueFormatters\FormatterOptions;
@@ -372,7 +374,7 @@
                if ( $result->getMainSnakType() === 'value' ) {
                        $value = $this->formatValue( $result->getDataValue() );
                } else {
-                       $value = $result->getMainSnakType();
+                       $value = htmlspecialchars( $result->getMainSnakType() );
                }
 
                $claimColumn = $this->getClaimLink(
@@ -619,13 +621,13 @@
         *
         * @param EntityId $entityId
         * @param PropertyId $propertyId
-        * @param string $text
+        * @param string $text HTML
         *
         * @return string HTML
         */
        private function getClaimLink( EntityId $entityId, PropertyId 
$propertyId, $text ) {
                return
-                       Html::element(
+                       Html::rawElement(
                                'a',
                                array (
                                        'href' => $this->getClaimUrl( 
$entityId, $propertyId ),

-- 
To view, visit https://gerrit.wikimedia.org/r/221083
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f0e15835c8393d3633f27752841969d392ac68a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: v1
Gerrit-Owner: Soeren.oldag <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to