Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Certain characters in a username break the @ functionality in a post.

lettielettie New
edited June 2015 in Vanilla 2.0 - 2.8

If a username has certain characters in it it will break the @ functionality in a post. For example if I want to flag an interesting post up to another user @username or @email@domain.com or @user.name. It breaks the @ tag. So my question is are there any other characters I should disallow to avoid this happening?

Tagged:

Comments

  • Options

    Hmmm interesting how it isn't breaking the tags in this forum post. I am using the latest version 2.1.11 but my tags break at the @ sign if the username is an email address and the dot if there is one in the name. So there must be an obvious fix for this as it's working here! If someone could let me know what it is that would be great. Cheers

  • Options
    hgtonighthgtonight ∞ · New Moderator
    edited June 2015

    This forum is running the hosted version which has a patch to format mentions for more characters.

    This patch should be in 2.2 which is currently going through the release process.

    EDIT - This looks like the right patch: https://github.com/vanilla/vanilla/pull/2501/files

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    @hgtonight cheers for that. Couple of extra bits to add in to get it working as the files had changed considerably before that fix was added. So as well as making the changes highlighted you need to add:

    `public static $MentionsUrlFormat = '/profile/{name}';`
    

    to the class.format.php file at line 36 under the

    `public static $FormatLinks = TRUE;`
    

    And also replace the existing line 1176

    `'\1'.Anchor('@\2', '/profile/\\2'),`
    

    with the git patch line 1392/1394 with

    `'\1'.Anchor('@$2', $urlFormat),`
    

    And it now works a treat.

Sign In or Register to comment.