Opened 2 years ago
Last modified 2 years ago
#56663 new enhancement
`tag_escape()` does not follow naming convention.
Reported by: | peterwilsoncc | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | |
Focuses: | coding-standards | Cc: |
Description
In WordPress, escaping functions generally use the naming convention esc_thing()
.
The tag_escape()
function and it's associated hook do not. Is it worth renaming each to either esc_tag
or the more precise esc_html_tag
?
There is some use within the plugin repository but not a huge amount.
Change History (2)
#2
@
2 years ago
It looks like tag_escape()
was introduced to match attribute_escape()
, but then got missed when attribute_escape()
was replaced with esc_attr()
:
- [4656] introduced
attribute_escape()
. - [7497] introduced
tag_escape()
. - [11103] turned
attribute_escape()
into a wrapper forattr()
. - [11204] renamed
attr()
toesc_attr()
. - [13096] deprecated
attribute_escape()
in favor ofesc_attr()
.
I think esc_tag()
would be more in line with esc_attr()
.
Note: See
TracTickets for help on using
tickets.
I'm for the
esc_html_tag
option. Would be more precise and in line with the other escaping functions 👍🏼