[wp-trac] [WordPress Trac] #24941: esc_sql in 3.6 changes how /r /n and maybe other characters handled

WordPress Trac noreply at wordpress.org
Sat Aug 3 13:57:11 UTC 2013


#24941: esc_sql in 3.6 changes how /r /n and maybe other characters handled
--------------------------+------------------------------
 Reporter:  sc0ttkclark   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:  3.6
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by sc0ttkclark):

 {{{
 $content = "Testing's it outs yo\r\nyahhhhh\r\n\"Yes\" `yeohoho`
 !@po`j-9j-``!#~!~Testing it out\n\nTest";
 var_dump( $content );
 var_dump( esc_sql( $content ) );
 var_dump( addslashes( $content ) );
 }}}

 Outputs:

 string(84) "Testing's it outs yo
 yahhhhh
 "Yes" `yeohoho` !@po`j-9j-``!#~!~Testing it out

 Test"
 string(93) "Testing\'s it outs yo\r\nyahhhhh\r\n\"Yes\" `yeohoho`
 !@po`j-9j-``!#~!~Testing it out\n\nTest"
 string(87) "Testing\'s it outs yo
 yahhhhh
 \"Yes\" `yeohoho` !@po`j-9j-``!#~!~Testing it out

 Test"

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24941#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list