element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.11k stars 1.98k forks source link

m.room.foo should not be linkified to hyperlink to http://m.room #5323

Open ara4n opened 6 years ago

lampholder commented 6 years ago

I see m.room.foo being likified to http://m.room.foo - is that what you meant?

.foo is soon to be a real tld, because apparently everything can be a tld :rage:

turt2live commented 6 years ago

I think this is more pointed at this image

lampholder commented 6 years ago

HMM. Linkification of course occurs to any string that looks like a URL.

.room (in addition to .foo, ffs) is also a valid tld, so m.room.related_groups is (from the linkifier's perspective) as valid as as any domain.tldl appearing at the end of any sentence.

We could (probably) fudge this to exclude linkification candidates which are followed by a . immediately followed by a non-space character.