ID: 43811 User updated by: steve1011 at att dot net Reported By: steve1011 at att dot net -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Windows 2003 server PHP Version: 5.2.5 New Comment:
Never mind. Stand alone testing showed one of my test strings was malformed and the others don't actually exibit the problem. Correctly formed strings (e backslash newline e) are not being changed by php parser. The problem appears to be related to mssql_query, the db client, or database, as the above test string as stored in the database ends up as ee. When inserted as (e backslash backslash newline newline e) the original string is stored. This does indicate a problem somewhere, but not the problem stated on this bug report. Previous Comments: ------------------------------------------------------------------------ [2008-01-11 02:45:09] steve1011 at att dot net Description: ------------ If a string contains backslash newline, in any form of input or string building, those characters are removed as if the parser is processing a script line. All other languages that I know of only remove the line continuation if it occurs outside of a string definition and leaves the inside of strings alone (other than normal escape sequences of double quoted strings). php even strips the backslash newline from text submitted through a web form and referenced as $_REQUEST['varname']. Line continuation characters effected are: backslash newline backslash carriage return backslash equal sign backslash 0x10 There may be more. I haven't completed testing yet, but will update this bug report if I find more. Reproduce code: --------------- I've tried test strings (letter e, backslash, newline, letter e) like: "e\\\ne" becomes "ee" 'e\'."\n".'e' becomes 'ee' 'e\'.0x0a.'e' becomes 'ee' "e\\\x0ae" becomes "ee" you get the idea. If I [sic] escape the string like this: "e\\\\\x0a\x0ae" I get the expected [e, backslash, newline, e] string. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43811&edit=1
