Changes between Version 1 and Version 2 of Ticket #37082, comment 1
- Timestamp:
- 06/28/2016 10:57:52 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #37082, comment 1
v1 v2 3 3 Given that these methods are designed to produce XML declaration pairs, I'd like to apply a label/string/uri sanitization such as the following: 4 4 5 public static function defaultMapAttrsFunc($k, $v) { 5 {{{ 6 public static function defaultMapAttrsFunc($k, $v) { 6 7 return preg_replace('/[0-9A-Za-z_-]+/', "", $k) . '="' . filter_var($v, FILTER_SANITIZE_ENCODED) . '"'; 7 } 8 } 9 }}} 8 10 9 11 and similar in defaultMapXmlnsFunc, of course.