Mercurial Hosting > chat
changeset 121:b96d598aa7d1 default tip
minor
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Fri, 05 Dec 2025 11:29:31 -0700 |
| parents | d7e143175d9f |
| children | |
| files | src/chat.js |
| diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r d7e143175d9f -r b96d598aa7d1 src/chat.js --- a/src/chat.js Fri Dec 05 09:05:55 2025 -0700 +++ b/src/chat.js Fri Dec 05 11:29:31 2025 -0700 @@ -253,10 +253,12 @@ let converter = window.markdownit({linkify:true}); let filebinUrlRegex = />https:\/\/filebin.net\/[0-9a-f]+\/([^<]+)</g; +let urlRegex = /(<a href="https?:\/\/[^" ]+")>/g; function handleMarkdown(text) { text = converter.renderInline(text); text = text.replace( filebinUrlRegex, '>$1<' ); + text = text.replace( urlRegex, '$1 target="_blank">' ); return text; }
