Homec4science

Add helper function for rendering HTML code

Authored by vrana <jakubv@fb.com> on Feb 4 2012, 23:31.

Description

Add helper function for rendering HTML code

Summary:
This function will allow reducing the number of callsites of
phutil_escape_html().
It will also allow better separation of templates and their data.
It will also reduce the number of potential XSS (like
"<strong>$callsign</strong>") where explicit call of phutil_escape_html() looks
like an overkill.

I will convert some code to this function if it will be accepted.

Test Plan: hsprintf('<td>%s</td>', '<x> & <y>')

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1575

Details

Committed
vrana <jakubv@fb.com>Feb 5 2012, 05:39
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU5bf950dc9d61: Merge pull request #8 from bgertzfield/master
Branches
Unknown
Tags
Unknown

Event Timeline

vrana <jakubv@fb.com> committed rPHU90cb77a1b538: Add helper function for rendering HTML code (authored by vrana <jakubv@fb.com>).Feb 5 2012, 05:39