From: vrana Date: Sat, 9 Feb 2013 23:04:20 +0000 (-0800) Subject: Deprecate phutil_escape_html() X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6a70964a405a2f5386c0157c6709984cc9dc57bc;p=arcanist.git Deprecate phutil_escape_html() Summary: My original idea was to return safe HTML from this function. But we are down to 20 occurrences in Phabricator and you shouldn't need this function in safe HTML world at all. Test Plan: $ arc lint src/applications/audit/controller/PhabricatorAuditListController.php Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D4890 --- diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php index 1a50300a..9a0e9d47 100644 --- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php +++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php @@ -30,7 +30,7 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { return array( self::LINT_PHT_WITH_DYNAMIC_STRING => 'Use of pht() on Dynamic String', self::LINT_ARRAY_COMBINE => 'array_combine() Unreliable', - self::LINT_DEPRECATED_FUNCTION => 'Use of deprecated function', + self::LINT_DEPRECATED_FUNCTION => 'Use of Deprecated Function', self::LINT_UNSAFE_DYNAMIC_STRING => 'Unsafe Usage of Dynamic String', ); } @@ -198,6 +198,10 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { 'phabricator_render_form' => 'The phabricator_render_form() function is deprecated and unsafe. '. 'Use phabricator_form() instead.', + + 'phutil_escape_html' => + 'The phutil_escape_html() function is deprecated. Raw strings passed '. + 'to phutil_tag() or hsprintf() are escaped automatically.', ); $function_calls = $root->selectDescendantsOfType('n_FUNCTION_CALL');