Support » Plugin: WP Biographia » Special chars in Biography Prefix

  • Resolved fabio.grasso


    Hi and thanks for this very useful plugin!

    I’ve found a problem with the Biography Prefix: if I use a the single quote ( ‘ ) character on it, In the page I see it with a back slash: \’

    I think that is related to some transformation in the php code.

    In Italian that character is widely used, for example “The author” is translated with “L’autore”, with the apostrophe.

    If you can fix it in the future release I will apreciate this


Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author vicchi


    I’ll take a look at this; I think there might be some cleverness with either PHP or WordPress sanitising the form field content for the prefix string. Bear with me.


    Perfect, thanks!

    Plugin Author vicchi


    I’ve dug into this a bi deeper and I think it’s probably more a side effect of PHP’s security measures than a WordPress or plugin issue. If you’re running a version of PHP prior to 5.4, then magic_quotes_gpc is on by default and this will automagically escape single and double quote characters in form fields. From 5.4 onwards, WordPress also does this for you.

    You can use WP Biographia’s wp_biographia_content_title filter to remove any escaped characters in the Biography Box title before it’s displayed though. Using your example of L’autore as the Biography Box prefix, the following code displays this correctly and without the escaped single quote.

    add_filter('wp_biographia_content_title', 'bio_prefix_override', 10, 3);
    function bio_prefix_override($content, $prefix, $formatted_name) {
    	return stripslashes($content);


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Special chars in Biography Prefix’ is closed to new replies.