erming / shout

Deprecated. See fork @ https://github.com/thelounge
MIT License
3.62k stars 272 forks source link

Clashes between auto-link and auto-channel #619

Open AlMcKinlay opened 8 years ago

AlMcKinlay commented 8 years ago

So, in one of the channels I'm in, it posts a link to xkcd everytime there is a new one. I noticed today that the link was completely messed up.

I'm not even sure why the auto-channel linker is dealing with this. But I think the "<" and ">" are confusing the auto-linker.

The HTML:

<div class="msg message ">
    <span class="time">
        23:24
    </span>
    <span class="from">
        <button class="user" style="color: #00a0de">MehBot</button>
    </span>
    <span class="text">
            xkcdwhatif: Europa Water Siphon <span class="inline-channel" role="button" tabindex="0" data-chan="<<a">&lt;<a< span=""> href="http://what-if.xkcd.com/143&gt;" target="_blank"&gt;http://what-if.xkcd.com/143/&gt;;
    </a<></span></span>
</div>

The message as seen on the client:

06:39 xkcd: Birdsong < href="http://xkcd.com/1635>" target="_blank">http://xkcd.com/1635/>; 

The original message:

[01:39:34] <MehBot> xkcd: Birdsong <http://xkcd.com/1635/>