From 6a70964a405a2f5386c0157c6709984cc9dc57bc Mon Sep 17 00:00:00 2001 From: vrana Date: Sat, 9 Feb 2013 15:04:20 -0800 Subject: [PATCH] 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 --- src/lint/linter/ArcanistPhutilXHPASTLinter.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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'); -- 2.43.0