mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 07:20:57 +01:00
Get rid of null characters
Summary: We had some null bytes appearing in strings from unit test results, which caused the PhutilRemarkupEngine to fail at properly generating html for it. Specifically, the string would get cut off at the null byte, and the closing </p> tag would never get added. The lack of this tag caused the dom for the rest of the page to end up inside a hidden td in the unit test results table. This is a horrible hack of a solution for this - it would be better to fix PhutilRemarkupEngine (and in the future, strip out null bytes in input in strings). Test Plan: load a differential revision and see content after the unittest results Reviewers: epriestley, vrana Reviewed By: vrana CC: aran, Korvin, rm Differential Revision: https://secure.phabricator.com/D5065
This commit is contained in:
parent
c1f234759b
commit
894cd13a41
1 changed files with 3 additions and 0 deletions
|
@ -112,6 +112,9 @@ final class DifferentialUnitFieldSpecification
|
|||
|
||||
$userdata = idx($test, 'userdata');
|
||||
if ($userdata) {
|
||||
if ($userdata !== false) {
|
||||
$userdata = str_replace("\000", '', $userdata);
|
||||
}
|
||||
$engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine();
|
||||
$userdata = $engine->markupText($userdata);
|
||||
$rows[] = array(
|
||||
|
|
Loading…
Reference in a new issue