WordPress.org

Ready to get started?Download WordPress

Forums

Wrong mail-link when username has a dot at the end (2 posts)

  1. tom_mioe
    Member
    Posted 3 years ago #

    When a username has a dot at the end (by example "Tom M."), then any mail sent to that user containing his username in a html request field excludes this last dot from the link the user has to click on.

    By examlple, such a link will have the form of "http://abcd.efg.hi/somefile.php?key=abcd&login=Tom%20M". (<- this last dot will be outside the link)

    When the user "Tom M." now klicks on the link, he will get an error-message, because a user "Tom M" (i.e. without the dot at the end) doesn't exist.

    Is there some kind of workaround? Or where should I look for?

  2. tom_mioe
    Member
    Posted 3 years ago #

    I found out that this problem evolves of most email-client's habit to not count ending dots as inside of the links where they occur.

    Entering the following line just before the return-statment of the function "get_size_url" in /wp-includes/link-template.php (nomally at line 1933) will solve the problem:

    if (substr($url, -1)=='.') { $url .= '&dot=true'; }

    (This just adds a dummy-paramater after links ending with a dot.)

    Of course each solution which acts from inside a plugin, i. e. the wp-content-directory would be more preferable, for it would survive the WordPress-update-process, which this one doesn't.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.