diff options
Diffstat (limited to 'app/assets/javascripts/blob/blob_utils.js')
-rw-r--r-- | app/assets/javascripts/blob/blob_utils.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/blob/blob_utils.js b/app/assets/javascripts/blob/blob_utils.js index 27fcc7f7b79..cc9c621c679 100644 --- a/app/assets/javascripts/blob/blob_utils.js +++ b/app/assets/javascripts/blob/blob_utils.js @@ -1,5 +1,5 @@ -// capture anything starting with http:// or https:// +// capture anything starting with http:// or https:// which is not already part of a html link // up until a disallowed character or whitespace -export const blobLinkRegex = /https?:\/\/[^"<>\\^`{|}\s]+/g; +export const blobLinkRegex = /(?<!<a href=")https?:\/\/[^"<>\\^`{|}\s]+/g; export default { blobLinkRegex }; |