Nischayn22 has uploaded a new change for review.

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


Change subject: (bug 32018) Parse feedback as wikitext.
......................................................................

(bug 32018) Parse feedback as wikitext.

Change-Id: I7d6594dfd44010f1b473fff7f951152a5f6fa12e
---
M ApiMoodBar.php
M SpecialFeedbackDashboard.php
2 files changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MoodBar 
refs/changes/74/49474/1

diff --git a/ApiMoodBar.php b/ApiMoodBar.php
index 5c0f10c..2704c3b 100644
--- a/ApiMoodBar.php
+++ b/ApiMoodBar.php
@@ -24,6 +24,10 @@
 
                $params['page'] = Title::newFromText( $params['page'] );
 
+               // Parse to wiki text
+               $parser = new Parser();
+               $params['comment'] = $parser->parse( $params['comment'], 
$params['page'], new ParserOptions() )->getText();
+
                // Params are deliberately named the same as the properties,
                //  just slurp them through.
                $item = MBFeedbackItem::create( array() );
diff --git a/SpecialFeedbackDashboard.php b/SpecialFeedbackDashboard.php
index 7850004..260da57 100644
--- a/SpecialFeedbackDashboard.php
+++ b/SpecialFeedbackDashboard.php
@@ -214,7 +214,7 @@
                $timeMsg = wfMessage( 'ago' )->params( 
MoodBarUtil::formatTimeSince( $timestamp ) )->escaped();
 
                // Comment
-               $comment = htmlspecialchars( 
$feedbackItem->getProperty('comment') );
+               $comment = $feedbackItem->getProperty('comment');
 
                // User information
                $userInfo = self::buildUserInfo( $feedbackItem );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d6594dfd44010f1b473fff7f951152a5f6fa12e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MoodBar
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 <[email protected]>

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

Reply via email to