1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 10:12:41 +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:
Nick Harper 2013-02-22 10:07:09 -08:00
parent c1f234759b
commit 894cd13a41

View file

@ -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(