From:             dev at glossword dot info
Operating system: Windows XP
PHP version:      4.3.6
PHP Bug Type:     XML related
Bug description:  Line feed characters removed

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 bug report at http://bugs.php.net/?id=28318&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28318&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28318&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28318&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28318&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28318&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28318&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28318&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28318&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28318&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28318&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28318&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28318&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28318&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28318&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28318&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28318&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28318&r=float

Reply via email to