Index: openacs-4/packages/xowiki/www/ajax/chat-common.js
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ajax/Attic/chat-common.js,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/xowiki/www/ajax/chat-common.js 9 Nov 2018 16:48:36 -0000 1.4
+++ openacs-4/packages/xowiki/www/ajax/chat-common.js 9 Nov 2018 20:09:40 -0000 1.5
@@ -3,12 +3,14 @@
var previous_user_id = "";
var current_color = "";
-// Simple function to create links
function createLink(text) {
- var linkRegex = /(https?:\/\/[^\s]+)/g;
- return text.replace(linkRegex, function(url) {
- return '' + url + '';
- })
+ if (linkRegex != null) {
+ return text.replace(new RegExp(linkRegex,'g'), function(url) {
+ return '' + url + '';
+ })
+ } else {
+ return text;
+ }
}
function renderData(json) {