mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Kill some PhutilSafeHTML
Summary: Also couple of unrelated Ponder changes. Test Plan: /Q5 Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4858
This commit is contained in:
parent
7dd19ba93f
commit
138da5a279
5 changed files with 22 additions and 28 deletions
|
@ -1666,7 +1666,7 @@ CREATE TABLE `ponder_question` (
|
|||
UNIQUE KEY `phid` (`phid`),
|
||||
KEY `authorPHID` (`authorPHID`),
|
||||
KEY `heat` (`heat`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11;
|
||||
|
||||
|
||||
CREATE DATABASE `{$NAMESPACE}_project` /*!40100 DEFAULT CHARACTER SET utf8 */;
|
||||
|
|
|
@ -22,7 +22,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
|
|||
array(
|
||||
'class' => 'setup-issue-instructions',
|
||||
),
|
||||
new PhutilSafeHTML(nl2br(phutil_escape_html($issue->getMessage()))));
|
||||
phutil_escape_html_newlines($issue->getMessage()));
|
||||
|
||||
$configs = $issue->getPHPConfig();
|
||||
if ($configs) {
|
||||
|
|
|
@ -316,9 +316,10 @@ final class PhabricatorDirectoryMainController
|
|||
array(
|
||||
'class' => 'phabricator-jump-nav-caption',
|
||||
),
|
||||
new PhutilSafeHTML(
|
||||
hsprintf(
|
||||
'Enter the name of an object like <tt>D123</tt> to quickly jump to '.
|
||||
'it. See '.$doc_link.' or type <tt>help</tt>.'));
|
||||
'it. See %s or type <tt>help</tt>.',
|
||||
$doc_link));
|
||||
|
||||
$panel = new AphrontPanelView();
|
||||
$panel->setHeader('Jump Nav');
|
||||
|
|
|
@ -39,7 +39,7 @@ final class PhabricatorApplicationPonder extends PhabricatorApplication {
|
|||
return true;
|
||||
}
|
||||
|
||||
public function getroutes() {
|
||||
public function getRoutes() {
|
||||
return array(
|
||||
'/Q(?P<id>[1-9]\d*)' => 'PonderQuestionViewController',
|
||||
'/ponder/' => array(
|
||||
|
@ -53,7 +53,8 @@ final class PhabricatorApplicationPonder extends PhabricatorApplication {
|
|||
'comment/add/' => 'PonderCommentSaveController',
|
||||
'(?P<kind>question)/vote/' => 'PonderVoteSaveController',
|
||||
'(?P<kind>answer)/vote/' => 'PonderVoteSaveController'
|
||||
));
|
||||
}
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,24 +51,20 @@ final class PonderCommentListView extends AphrontView {
|
|||
$comment->getMarkupField(),
|
||||
$this->user);
|
||||
|
||||
$comment_anchor = '<a name="comment-' . $comment->getID() . '" />';
|
||||
$comment_markup[] =
|
||||
$comment_anchor = '';
|
||||
$comment_markup[] = hsprintf(
|
||||
'<tr>'.
|
||||
'<th>'.
|
||||
$comment_anchor.
|
||||
'</th>'.
|
||||
'<th><a name="comment-%s" /></th>'.
|
||||
'<td>'.
|
||||
'<div class="phabricator-remarkup ponder-comment-markup">'.
|
||||
$body.
|
||||
' —'.
|
||||
$handle->renderLink().
|
||||
' '.
|
||||
'<span class="ponder-datestamp">'.
|
||||
phabricator_datetime($comment->getDateCreated(), $user).
|
||||
'</span>'.
|
||||
'%s —%s <span class="ponder-datestamp">%s</span>'.
|
||||
'</div>'.
|
||||
'</td>'.
|
||||
'</tr>';
|
||||
'</tr>',
|
||||
$comment->getID(),
|
||||
$body,
|
||||
$handle->renderLink(),
|
||||
phabricator_datetime($comment->getDateCreated(), $user));
|
||||
}
|
||||
|
||||
$addview = id(new PonderAddCommentView)
|
||||
|
@ -77,20 +73,16 @@ final class PonderCommentListView extends AphrontView {
|
|||
->setQuestionID($this->questionID)
|
||||
->setActionURI($this->actionURI);
|
||||
|
||||
$comment_markup[] =
|
||||
'<tr>'.
|
||||
'<th> </th>'.
|
||||
'<td>'.$addview->render().'</td>'.
|
||||
'</tr>';
|
||||
$comment_markup[] = hsprintf(
|
||||
'<tr><th> </th><td>%s</td></tr>',
|
||||
$addview->render());
|
||||
|
||||
$comment_markup = phutil_tag(
|
||||
'table',
|
||||
array(
|
||||
'class' => 'ponder-comments',
|
||||
),
|
||||
new PhutilSafeHTML(implode("\n", $comment_markup))
|
||||
);
|
||||
|
||||
$comment_markup);
|
||||
|
||||
return $comment_markup;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue