Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #37082, comment 1


Ignore:
Timestamp:
06/28/2016 10:57:52 AM (8 years ago)
Author:
ocean90
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #37082, comment 1

    v1 v2  
    33Given that these methods are designed to produce XML declaration pairs, I'd like to apply a label/string/uri sanitization such as the following:
    44
    5   public static function defaultMapAttrsFunc($k, $v) {
     5{{{
     6public static function defaultMapAttrsFunc($k, $v) {
    67    return preg_replace('/[0-9A-Za-z_-]+/', "", $k) . '="' . filter_var($v, FILTER_SANITIZE_ENCODED) . '"';
    7   }
     8}
     9}}}
    810
    911and similar in defaultMapXmlnsFunc, of course.