Fix overescaping in Paste
Summary: Two issues: - When we read the content out of cache, it has lost its "safe html" flag, since the cache is raw-string oriented. Restore it. - explode() isn't safe-html-safe. Use phutil_split_lines() instead, which is. Test Plan: Looked at /paste/ Reviewers: codeblock, chad Reviewed By: codeblock CC: aran Differential Revision: https://secure.phabricator.com/D4980
This commit is contained in:
@@ -44,7 +44,7 @@ abstract class PhabricatorPasteController extends PhabricatorController {
|
||||
PhabricatorPaste $paste,
|
||||
$max_lines = null) {
|
||||
|
||||
$lines = explode("\n", rtrim($paste->getContent()));
|
||||
$lines = phutil_split_lines($paste->getContent());
|
||||
|
||||
return id(new PhabricatorSourceCodeView())
|
||||
->setLimit($max_lines)
|
||||
|
||||
Reference in New Issue
Block a user