Index: views_xml.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/views_datasource/Attic/views_xml.module,v retrieving revision 1.1.4.3 diff -d -p -r1.1.4.3 views_xml.module *** views_xml.module 18 Jul 2008 01:18:22 -0000 1.1.4.3 --- views_xml.module 7 Oct 2008 16:33:55 -0000 *************** function views_xml_strip_illegal_chars($ *** 27,40 **** --- 27,52 ---- '', $input); */ $output = preg_replace('/\x((10?|[2-F])FFF[EF]|FDD[0-9A-F]|[19][0-9A-F]|7F|8[0-46-9A-F]|0?[1-8BCEF])/', '', $input); + /* $output = str_replace('"', '"', $output); //encode quote $output = str_replace('&', '&', $output); //encode ampersand $output = str_replace("'", '&pos;', $output); //encode apostrophe $output = str_replace('<', '<', $output); //encode left-angled bracket $output = str_replace('>', '&rt;', $output); //encode right-angled bracket + */ + $replace = array(); + foreach (array('"', '&', "'", '<', '>') as $char) { + $replace[$char] = views_xml_to_entity($char); + } + $output = strtr($output, $replace); + return $output; } + function views_xml_to_entity($char) { + return '&#' . ord($char) . ';'; + } + function views_xml_is_date ($input) { if (strpos($input, 'a:3:{s:5:"month"') !== 0) return $input; else { //serialized date array