stream-chat-angular 5.12.0 → 5.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ import transliterate from '@stream-io/transliterate';
20
20
  import * as i8$1 from 'angular-mentions';
21
21
  import { MentionModule } from 'angular-mentions';
22
22
 
23
- const version = '5.12.0';
23
+ const version = '5.12.1';
24
24
 
25
25
  /**
26
26
  * The `NotificationService` can be used to add or remove notifications. By default the [`NotificationList`](/chat/docs/sdk/angular/components/NotificationListComponent/) component displays the currently active notifications.
@@ -5160,9 +5160,15 @@ class MessageTextComponent {
5160
5160
  */
5161
5161
  this.shouldTranslate = false;
5162
5162
  this.messageTextParts = [];
5163
- this.urlRegexp = /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.|(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,})(?![^\s]*@[^\s]*)(?:[^\s()<>]+|\([\w\d]+\))*(?<!@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})/gim;
5164
5163
  this.emojiRegexp = new RegExp(emojiRegex(), 'g');
5165
5164
  this.displayAs = this.messageService.displayAs;
5165
+ try {
5166
+ this.urlRegexp = new RegExp('(?:(?:https?|ftp|file):\\/\\/|www\\.|ftp\\.|(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,})(?![^\\s]*@[^\\s]*)(?:[^\\s()<>]+|\\([\\w\\d]+\\))*(?<!@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,})', 'gim');
5167
+ }
5168
+ catch {
5169
+ this.urlRegexp =
5170
+ /(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/gim;
5171
+ }
5166
5172
  }
5167
5173
  ngOnChanges(changes) {
5168
5174
  if (changes.message || changes.shouldTranslate) {