Support » Plugin: User Meta Manager » Usermeta values with apostrophe returned with backslash

  • Resolved festsoft


    A custom user meta field value like O’Reilly is stored in wp_usermeta as O\’Reilly [1] and displayed as O\’Reilly [2] in the User Meta Manager table and when I access it with get_user_meta(). This does not happen with the wp-user field values, which are O’Reilly in the database and when accessed. Is there a known work-round for this please?

    Note [1] and [2] in case this post does not display as intended the value I am reporting is: O[backslash][apostrophe]Reilly

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author President McCheese


    Use PHP function stripslashes($string).


    $string = get_user_meta($user_id, 'my_custom_meta', true);
    echo stripslashes($string);

    Yes, I know about stripslashes, but it is complicated for me to edit UMM to apply that fix to the User Meta Manager table. And I do not have to use stripslashes when accessing wp-user values. So is this a bug in UMM?

    Plugin Author President McCheese


    Sorry, I misunderstood the question.

    Yes, it could be a bug. I will have a look.

    Plugin Author President McCheese


    This is fixed in version 3.1.1. Thanks!

    Thanks, it is partially fixed. Slashes are removed from the table, but it would be good to remove them from the database insertion code. A UMM custom meta-data field in wp_usermeta table is eg O\’Reilly whereas in the same table the WP ‘last_name’ field is correctly O’Reilly.

    PS: Sorry if confusing – slashes are removed from the displayed table but not from the MySQL database table wp_usermeta.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Usermeta values with apostrophe returned with backslash’ is closed to new replies.