diff --git a/src/components/NcRichText/NcRichText.vue b/src/components/NcRichText/NcRichText.vue index 9b7ceea601..4143ea7775 100644 --- a/src/components/NcRichText/NcRichText.vue +++ b/src/components/NcRichText/NcRichText.vue @@ -39,6 +39,8 @@ export default { return { text: `Hello {username}. The file {file} was added by {username}. Go visit https://nextcloud.com +Local IP: http://127.0.0.1/status.php should be clickable + Some examples for markdown syntax: **bold text** *italic text* ~~strikethrough~~`, autolink: true, useMarkdown: true, diff --git a/src/components/NcRichText/helpers.js b/src/components/NcRichText/helpers.js index 0f95e0f1e2..a6dc89566e 100644 --- a/src/components/NcRichText/helpers.js +++ b/src/components/NcRichText/helpers.js @@ -1,4 +1,4 @@ -export const URL_PATTERN = /(\s|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig +export const URL_PATTERN = /(\s|^)(https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z0-9]+(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*)(\s|$)/ig // FIXME See if we can merge those two -export const URL_PATTERN_AUTOLINK = /(\s|\(|^)((https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig +export const URL_PATTERN_AUTOLINK = /(\s|\(|^)((https?:\/\/)((?:[-A-Z0-9+_]+\.)+[-A-Z0-9]+(?::[0-9]+)?(?:\/[-A-Z0-9+&@#%?=~_|!:,.;()]*)*))(?=\s|\)|$)/ig