ID: 28318 User updated by: dev at glossword dot info Reported By: dev at glossword dot info -Status: Feedback +Status: Closed Bug Type: XML related Operating System: Windows XP PHP Version: 4.3.6 New Comment:

 works great. Thanks. Not a bug. Previous Comments: ------------------------------------------------------------------------ [2004-05-07 19:45:09] [EMAIL PROTECTED] I believe this is the correct behavior according to the XML specification. See: http://www.w3.org/TR/REC-xml/#AVNormalize To preserve line feeds, you should either wrap your attribute values inside a CDATA section or use entities, like 
. ------------------------------------------------------------------------ [2004-05-07 19:29:49] dev at glossword dot info Description: ------------ Line feed characters has beed accidentally removed from a tag attributes. Reproduce code: --------------- $string = "<a title=\" 123 \n 456 \r\n 789 \">link</a>"; $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 0); xml_parse_into_struct($parser, $string, $values, $tags); xml_parser_free($parser); print '<pre>'; print_r( $values ); print '</pre>'; Expected result: ---------------- I expect to keep all line feed characters in attributes. Better if it could be possible add a special option for xml_parser, like xml_parser_set_option($parser, XML_OPTION_KEEP_LF, 1); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28318&edit=1