I'm using Subscribe2 plugin in my new upcoming WordPress blog (http://www.adlerr.com). My blog's title is "Roee Adler's Blog". When sending an email, Subscribe2 escapes the apostrophe in my blog's title, and the e-mail subject is received as follows:

[Roee Adler's Blog] Please confirm your request

The e-mail body is:

Roee Adler's Blog has received a request to subscribe for this email address. To complete your request please click on the link below:

I would naturally like to have the "normal" un-escaped version of my blog name in the title and body.

How can I achieve that?


EDIT: I asked the same question on StackOverflow and received an answer that solved my problem. Link: WordPress Subscribe2 plugin escapes characters in blog name when sending email

2 answers


When you save a post in Wordpress, the title is HTML escaped and then stored in the database. This allows you to just pull the raw title out in themes and get something that looks good. Unfortunately, if an add-on doesn't take this into account (or doesn't do a full conversion of all escaped items) then you get the effect you're seeing.

Your best bet would be to contact the add-on author and see if he can fix it (it's pretty easy in PHP, literally a single function) or try and find the spot that generates the e-mail in the add-on code and wrap the PHP function around it to do the conversion for you.

Edit: I'm going to attach an image that shows a possible change to the code that might help. alt text

Answered about 10 years ago by Nathan DeGruchy
  • I added "htmlspecialchars_decode" wrapper for both BLOGNAME and TITLE str_replace operations (at the position where you provided the screenshot), but it still sends escaped text. Rax Olgud about 10 years ago
  • It's likely somewhere else in the source. Like I said, you're probably better off contacting the add-on maintainer/owner to see if he can fix it. Nathan DeGruchy about 10 years ago
danwellman 5600

Could you escape the escape character? By adding \ before the appostrophe it may signal to the plugin that the character is a normal text character and doesn't need to be escaped...It's not wordpress-specific, more likely it is PHP not the wordpress plugin that is causing this behaviour

Answered about 10 years ago by danwellman
  • But that would change my blog's name... I want to maintain its name in the webpage etc. Rax Olgud about 10 years ago