WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] Email Subject Contains HTML After Upgrade to WordPress 3.5 (9 posts)

  1. DigitalOxygen.ca
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/subscribe2/

  2. DigitalOxygen.ca
    Member
    Posted 1 year ago #

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

    Try this...

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

  3. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @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));

  4. DigitalOxygen.ca
    Member
    Posted 1 year ago #

    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?

  5. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @DigitalOxygen.ca,

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

  6. DigitalOxygen.ca
    Member
    Posted 1 year ago #

    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.

  7. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @DigitalOxygen.ca,

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

  8. DigitalOxygen.ca
    Member
    Posted 1 year ago #

    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?

  9. mattyrob
    Member
    Plugin Contributor

    Posted 1 year ago #

    @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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.