[wp-trac] [WordPress Trac] #40635: Move JavaScript `sanitizeText` and `stripTags` functions from press-this to core

WordPress Trac noreply at wordpress.org
Tue May 2 16:01:52 UTC 2017


#40635: Move JavaScript `sanitizeText` and `stripTags` functions from press-this to
core
----------------------------------------+------------------------------
 Reporter:  adamsilverstein             |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  General                     |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  javascript
----------------------------------------+------------------------------
Changes (by adamsilverstein):

 * keywords:  needs-patch => has-patch needs-unit-tests


Comment:

 [attachment:40635.diff] moves the `sanitizeText` and `stripTags` functions
 from `wp-admin/js/press-this.js` to `wp-includes/js/utils.js` and
 namespaces them as `wp.utils.sanitizeText` and `wp.utils.stripTags`.

 Some unit tests for these helpers would be a great addition, if we have
 them I couldn't find them.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40635#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list