Test Crafted vs. Auto mentions


  • mod

    Continuing the discussion from Usercard broken on crafted @mention:

    @accalia said:

    Continuing the discussion from Post count bug:

    @accalia said:

    @racperouk doesn't seem to mind.

    <a class="mention" href="/users/raceprouk">@racperouk</a> doesn't seem to mind.
    

    as you can see here i crafted the mention link to have the right link, but the wrong visible text.

    I was hoping that the user card would still work and that @raceprouk would get the notification.

    wrong on both counts!

    rather than getting the username from the link the user card JS seems to get it from the tag contents!

    <a class="mention" href="/users/abarker">@abarkre</a>
    @abarkre

    @abarker
    @abarker


  • mod

    @abarker said:

    <a class="mention" href="/users/abarker">@abarkre</a>
    @abarkre

    @abarker said:

    @abarker
    @abarker

    Seems that there's a difference in the HTML. It looks like the problem is probably that the span in the crafted mention is capturing the click and the resulting processing is based on the text in the span instead of the href attribute of the anchor.


  • SockDev

    ...... why is the span there in the first place? i didn't put it there!


  • mod

    @accalia said:

    ...... why is the span there in the first place? i didn't put it there!

    I should hope not! That's my post!

    To answer your question: Discourse.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.