• Resolved DigitalOxygen.ca

    (@digitaloxygenca)


    So I might be SOL after seeing that wordpress 3.4.2 is listed for “Compatible up to:” but here goes.

    Ever since upgrading to wordpress 3.5 the email subject line contains HTML code. For example the subject line for my most recent post looks like this.

    [Digital Oxygen Photography Blog] Hot & Fresh: Blog Upgraded!

    Wondering if wordpress changed their API and whatever the {TITLE} tag in Subscribe2 is mapped to now returns a HTML link instead of the post title?

    I could probably hack at the subscribe2 code to fix it but wondering what the recommended approach is.

    https://www.ads-software.com/extend/plugins/subscribe2/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter DigitalOxygen.ca

    (@digitaloxygenca)

    oops, my example got formatted as actual HTML and highlighted the link..

    Try this…

    [Digital Oxygen Photography Blog] <a href="https://digitaloxygen.ca/blog/photography/hot-fresh-blog-upgraded/">Hot & Fresh: Blog Upgraded!</a>

    @DigitalOxygen.ca,

    This is going to be fixed in the next version of the code but if you can’t wait and want an instant fix have a look in the wp-content/plugins/subscribe2/classes folder for the classes-s2-core.php file.

    In there you’ll fund a publish() function and in there you’ll find this line:
    $subject = html_entity_decode($subject, ENT_QUOTES);
    Replace that with:
    $subject = strip_tags(html_entity_decode($subject, ENT_QUOTES));

    Thread Starter DigitalOxygen.ca

    (@digitaloxygenca)

    Thanks, this is perfect. I definitely want to implement it right away.

    How can I send a test message to just myself to see if the changes worked?

    @DigitalOxygen.ca,

    In the Subscribe2->Settings page, under the Template section click Send Email Previews.

    Thread Starter DigitalOxygen.ca

    (@digitaloxygenca)

    Ah, there is it. Message sent but the subject seems to be static and reads “Once Daily Digest Email” as opposed to the title of the latest post. Seems like this may not be a valid test of the change since the subject wasn’t actually pulled from the post title and thus isn’t using the modified line of code that sets the subject.

    Guess I could modify the code that sends the Preview to include the subject of the most recent post? Suggestions?

    I could simply publish a test post but I’d rather not annoy the subscribed users with that.

    @DigitalOxygen.ca,

    Have you switched to digest based emails? From the Preview email subject it would appear that you have.

    Thread Starter DigitalOxygen.ca

    (@digitaloxygenca)

    Ah yes, for course. I had switched to digest after my last post went out thinking I might want to use that approach but if it will give a generic subject I will probably stick with “for each post”. I don’t usually post more than once a day anyway.

    Switching back to “for each post” and resending the preview worked.

    Thanks for the quick responses and the fix!

    PS, what do you expect the next version of Subscribe2 to come out and will there be any feature changes or just bug fixes?

    @DigitalOxygen.ca,

    I’m hoping it’ll be very soon, like before the weekend.

    It has some new aspects as well as fixes. Have a look at what’s already in the changelog section of the core readme.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Email Subject Contains HTML After Upgrade to WordPress 3.5’ is closed to new replies.