QnA - Rework output for notice stream

This commit is contained in:
Zach Copley
2011-04-04 15:08:47 -07:00
parent e7124528a3
commit 9a371658bd
3 changed files with 24 additions and 26 deletions

View File

@@ -213,14 +213,12 @@ class QnA_Question extends Managed_DataObject
{
$notice = $question->getNotice();
$fmt = '<span class="question_description">%s</span>';
$out = new XMLStringer();
$out->elementStart('span', 'question_description');
$out->raw(QnAPlugin::shorten($question->description, $notice));
$out->elementEnd('span');
$q = sprintf(
$fmt,
htmlspecialchars($question->description)
);
return $q;
return $out->getString();
}
static function toString($profile, $question, $answers)