Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ampersand etc. appearing as escapes in BuddyPress emails only


  • Antipole
    Participant

    @antipole

    Can anyone help with this?

    When I send an email through BuddyPress (i.e. send a private message to another user) various non-alphabet characters appear as code numbers or escape sequences. & appears as &amp etc.

    With the plugin Log Emails installed it logs the email correctly without the escapes, yet the delivered email has the escape sequences.

    If I send from a WordPress part of the site (not from BuddyPress) then all is well, so this seems specific to emails sent from the BuddyPress part.

    I have tried deactivating all plugins apart from BuddyPress and also switched to the theme 2010 – no better.

    In my config.php file I have
    define(‘DB_CHARSET’, ‘utf8’);

    Any suggestions, please?

    WP 4.2.2
    BuddyPress 2.3.2.1
    bbPress 2.5.7

Viewing 1 replies (of 1 total)

  • Antipole
    Participant

    @antipole

    I have solved this problem by filtering the relevant data and processing it with the following, which deals with the escaped sequences I was seeing.

    function ovni_decode_escapes($string){
    	// various characters will be escaped - decode them back
    	$string = html_entity_decode($string, ENT_QUOTES);  // deal with escaped quotes
    	$string = str_replace('–', '–', $string);  // and the pesky dash
    	return $string;
    	}
Viewing 1 replies (of 1 total)
  • The topic ‘Ampersand etc. appearing as escapes in BuddyPress emails only’ is closed to new replies.
Skip to toolbar