[wp-trac] [WordPress Trac] #27583: Move color sanitize function to wp-includes/formatting.php

WordPress Trac noreply at wordpress.org
Tue Sep 23 15:50:41 UTC 2014


#27583: Move color sanitize function to wp-includes/formatting.php
-----------------------------------+-----------------------------
 Reporter:  tollmanz               |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Future Release
Component:  Formatting             |     Version:  3.4
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  template
-----------------------------------+-----------------------------

Comment (by downstairsdev):

 Perhaps sanitize_hex_color() could require a valid fallback.  That's the
 only way I can think to return a valid sanitized hex that would be
 acceptable if the passed value doesn't validate.  Similar to how
 sanitize_html_class works:
 https://core.trac.wordpress.org/browser/tags/4.0/src/wp-
 includes/formatting.php#L1327.

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


More information about the wp-trac mailing list