[wp-trac] [WordPress Trac] #44154: saving backslash backslash into user_meta does not round-trip

WordPress Trac noreply at wordpress.org
Sat May 19 14:03:34 UTC 2018


#44154: saving backslash backslash into user_meta does not round-trip
--------------------------+-----------------------------
 Reporter:  ericscheid    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9.5
 Severity:  critical      |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 This code:

 {{{
 $user_id = get_current_user_id();
 $input = 'double ' .chr(92) . chr(92) . ' slashes';

 update_user_meta($user_id, 'update_meta_bug', $input);
 $output = get_user_meta($user_id, 'update_meta_bug', true);

 if ( $output != $input ) {
   echo '<b>$output != $input</b>';
 }
 }}}

 Produces this output:
 {{{
 $output != $input
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44154>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list