[wp-trac] [WordPress Trac] #20491: Introduce some JavaScript i18n functions
WordPress Trac
noreply at wordpress.org
Fri Sep 9 21:26:14 UTC 2016
#20491: Introduce some JavaScript i18n functions
--------------------------------------+-----------------------------
Reporter: johnbillion | Owner: swissspidy
Type: enhancement | Status: assigned
Priority: normal | Milestone: Future Release
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses: javascript
--------------------------------------+-----------------------------
Comment (by swissspidy):
In [attachment:20491.4.diff]:
* Remove underscore.js as a dependency of `wp-i18n.js`
* Add `esc_attr_x()`, `esc_html__()` and `esc_html_x()` in addition to
`esc_attr__()`.
I added both esc_attr_* and esc_html_* functions even though in PHP those
actually do the same. Escaping is done through I private `escape` method
which is inspired by `_.escape()`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20491#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list