Viewing 1 replies (of 1 total)
  • Plugin Author Till Krüss

    (@tillkruess)

    Yes, that’s the problem with regular expressions, but you can double check all found strings and only have the “real” email addresses encoded:

    add_filter( 'eae_method', function() {
    	return 'custom_eae_encode_method';
    } );
    
    function custom_eae_encode_method( $string ) {
    
    	if ( preg_match( '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/', $string ) ) {
    		return eae_encode_str( $string );
    	}
    
    	return $string;
    
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Plugin encodes image source including @’ is closed to new replies.