Forums

The WordPress MU forums have moved to the MultiSite forum on WordPress.org

Allow Ampersand (&) in email address (3 posts)

  1. jmasson
    Member
    Posted 2 years ago #

    Hi,

    I'm wanting to allow distribution lists to be created as users in my WPMU install to do do email notifications to a number of users on new posts.

    The notification stuff is working great with the Subscribe2 plugin, but I've hit a snag in that some of the distribution lists have an ampersand (&) character in them... Wordpress appears to convert this to 'amp' so presumably email notifications won't be received...

    I say 'presumably' because I don't want to test by mailing a heap of people with one of these lists ;) but it doesn't look like wordpress has 'escaped' the &, how would it know to turn amp into that, what if my email really was amp@xyz.com...

    So has anyone dealt with this and can advise a way around? My first thought is to just put the & back in the db, but I don't know if that will break queries made on the field as I am unsure of the level of escaping done on queries...

    Thanks,
    JM

  2. SteveAtty
    Member
    Posted 2 years ago #

    That's going to be down to the sanitize email function which I think is core WordPress.

    If you need this to be done, and not have to change your code every time then you'd need to raise it in Trac.

    "&" in email addresses is really a "Maybe" as they are not excluded in the formal spec for email addresses but neither are the actually included.

  3. jmasson
    Member
    Posted 2 years ago #

    Yeah a pretty grey area I agree!!

    I've been able to get alias addresses setup for the offending addresses so I'm going to settle on that as a much more supportable option rather than hacking Wordpress core as you say...

    Thanks for the reply!

Topic Closed

This topic has been closed to new replies.

About this Topic