diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml
index a689952755..8228cb4d81 100755
--- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml
+++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml
@@ -214,7 +214,9 @@
private function parseURLs(message:String):String{
var indexOfHTTP:Number = message.indexOf("http://");
var indexOfWWW:Number = message.indexOf("www.");
- if (indexOfHTTP == -1 && indexOfWWW == -1) return message;
+ var indexOfHTTPS:Number = message.indexOf("https://");
+
+ if (indexOfHTTP == -1 && indexOfWWW == -1 && indexOfHTTPS == -1) return message;
var words:Array = message.split(" ");
var parsedString:String = "";
@@ -223,6 +225,7 @@
var word:String = words[n] as String;
if (word.indexOf("http://") != -1) parsedString += ' ' + word + ' ';
else if (word.indexOf("www.") != -1) parsedString += ' ' + word + ' ';
+ else if (word.indexOf("https://") != -1) parsedString += ' ' + word + ' ';
else parsedString += word + ' ';
}
return parsedString;
@@ -230,7 +233,8 @@
private function sendPublicChatMessage(message:String):void {
var publicEvent:SendPublicChatMessageEvent = new SendPublicChatMessageEvent(SendPublicChatMessageEvent.SEND_PUBLIC_CHAT_MESSAGE_EVENT);
- publicEvent.message = parseURLs(cleanup(message));
+ //publicEvent.message = parseURLs(cleanup(message));
+ publicEvent.message = cleanup(message);
publicEvent.color = chatWindow.cmpColorPicker.selectedColor.toString();
publicEvent.time = currentTime();
publicEvent.language = ResourceUtil.getInstance().getCurrentLanguageCode().split("_")[0];
@@ -244,7 +248,8 @@
private function sendPrivateChatMessage():void {
var privateEvent:SendPrivateChatMessageEvent = new SendPrivateChatMessageEvent(SendPrivateChatMessageEvent.SEND_PRIVATE_CHAT_MESSAGE_EVENT);
- privateEvent.message = parseURLs(cleanup(chatWindow.txtMsg.text));
+ //privateEvent.message = parseURLs(cleanup(chatWindow.txtMsg.text));
+ privateEvent.message = cleanup(chatWindow.txtMsg.text);
privateEvent.toUser = chatTabs.selectedChild.name;
privateEvent.color = chatWindow.cmpColorPicker.selectedColor.toString();
privateEvent.time = currentTime();
@@ -364,6 +369,9 @@
private function handlePublicChatMessageEvent(event:PublicChatMessageEvent):void {
LogUtil.debug("Got PublicChatMessageEvent from userid [ " + event.chatobj.userid + " ]");
+ if(event.chatobj.userid != "")
+ event.chatobj.message = parseURLs(event.chatobj.message);
+
showMessage(PUBLIC_CHAT_USERID, event.chatobj, autoTranslation);
if ((!this.focus) &&
(! UserManager.getInstance().getConference().amIThisUser(new Number(event.chatobj.userid))) &&
@@ -378,6 +386,8 @@
if ((!this.focus) && (! UserManager.getInstance().getConference().amIThisUser(new Number(event.message.sender)))) {
ExternalInterface.call("startblink", ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting'), ResourceUtil.getInstance().getString('bbb.chat.privateMsgAwaiting2'));
}
+ if(event.message.chatobj.userid != "")
+ event.message.chatobj.message = parseURLs(event.message.chatobj.message);
showMessage(event.message.sender, event.message.chatobj, autoTranslation);
}
diff --git a/record-and-playback/core/lib/recordandplayback/generators/events.rb b/record-and-playback/core/lib/recordandplayback/generators/events.rb
index 8baca9a3be..3751497814 100755
--- a/record-and-playback/core/lib/recordandplayback/generators/events.rb
+++ b/record-and-playback/core/lib/recordandplayback/generators/events.rb
@@ -131,6 +131,16 @@ module BigBlueButton
stop_events << s
end
stop_events.sort {|a, b| a[:stop_timestamp] <=> b[:stop_timestamp]}
- end
+ end
+
+ def self.linkify( text )
+ generic_URL_regexp = Regexp.new( '(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t<]*)', Regexp::MULTILINE | Regexp::IGNORECASE )
+ starts_with_www_regexp = Regexp.new( '(^|[\n ])((www)\.[^ \"\t\n\r<]*)', Regexp::MULTILINE | Regexp::IGNORECASE )
+
+ s = text.to_s
+ s.gsub!( generic_URL_regexp, '\1\2' )
+ s.gsub!( starts_with_www_regexp, '\1\2' )
+ s
+ end
end
end
diff --git a/record-and-playback/presentation/scripts/publish/presentation.rb b/record-and-playback/presentation/scripts/publish/presentation.rb
index 1a2b27eb59..a2fe4df769 100755
--- a/record-and-playback/presentation/scripts/publish/presentation.rb
+++ b/record-and-playback/presentation/scripts/publish/presentation.rb
@@ -490,7 +490,7 @@ def processChatMessages
$chat_events.each do |node|
chat_timestamp = node[:timestamp]
chat_sender = node.xpath(".//sender")[0].text()
- chat_message = node.xpath(".//message")[0].text()
+ chat_message = BigBlueButton::Events.linkify(node.xpath(".//message")[0].text())
chat_start = (chat_timestamp.to_i - $meeting_start.to_i) / 1000
$xml.timeline(:in => chat_start, :direction => :down, :innerHTML => "#{chat_sender}: #{chat_message}", :target => :chat )
end
diff --git a/record-and-playback/slides/scripts/publish/slides.rb b/record-and-playback/slides/scripts/publish/slides.rb
index f92d859bd0..d2eda29173 100755
--- a/record-and-playback/slides/scripts/publish/slides.rb
+++ b/record-and-playback/slides/scripts/publish/slides.rb
@@ -117,7 +117,7 @@ if (playback == "slides")
chat_events.each do |node|
chat_timestamp = node['timestamp']
chat_sender = node.xpath(".//sender")[0].text()
- chat_message = node.xpath(".//message")[0].text()
+ chat_message = BigBlueButton::Events.linkify(node.xpath(".//message")[0].text())
chat_start = (chat_timestamp.to_i - meeting_start.to_i) / 1000
xml.timeline(:in => chat_start, :direction => "down", :innerHTML => "#{chat_sender}: #{chat_message}", :target => "chat" )
end