Autolinker.js icon indicating copy to clipboard operation
Autolinker.js copied to clipboard

fix: prevent linking text with directional change char

Open yadue opened this issue 3 years ago • 2 comments

This PR would disable linking for urls with directional change characters

Fixes #377

yadue avatar Sep 08 '22 07:09 yadue

Hmm, this isn't the worst idea, and is much better than stripping characters. It would mean however that people putting URLs in the middle of text in Arabic or Hebrew will not get linked URLs at all. (Not saying this isn't viable, but if this solution is accepted then at least a warning should be shown about this.)

dbrgn avatar Sep 08 '22 12:09 dbrgn

Hey @yadue, I mentioned in #377 but should mention it here too: would you like to take a stab at URL-encoding the RTLO chars rather than rejecting the match? This might end up being our ideal solution. Thoughts?

gregjacobs avatar Sep 08 '22 15:09 gregjacobs