Changeset View
Changeset View
Standalone View
Standalone View
src/applications/feed/story/PhabricatorFeedStory.php
| Show First 20 Lines • Show All 372 Lines • ▼ Show 20 Lines | switch ($this->getRenderingTarget()) { | ||||
| return $str; | return $str; | ||||
| case PhabricatorApplicationTransaction::TARGET_HTML: | case PhabricatorApplicationTransaction::TARGET_HTML: | ||||
| return phutil_tag('strong', array(), $str); | return phutil_tag('strong', array(), $str); | ||||
| } | } | ||||
| } | } | ||||
| final protected function renderSummary($text, $len = 128) { | final protected function renderSummary($text, $len = 128) { | ||||
| if ($len) { | if ($len) { | ||||
| $text = phutil_utf8_shorten($text, $len); | $text = id(new PhutilUTF8StringTruncator()) | ||||
| ->setMaximumGlyphs($len) | |||||
| ->truncateString($text); | |||||
| } | } | ||||
| switch ($this->getRenderingTarget()) { | switch ($this->getRenderingTarget()) { | ||||
| case PhabricatorApplicationTransaction::TARGET_HTML: | case PhabricatorApplicationTransaction::TARGET_HTML: | ||||
| $text = phutil_escape_html_newlines($text); | $text = phutil_escape_html_newlines($text); | ||||
| break; | break; | ||||
| } | } | ||||
| return $text; | return $text; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||