From 662ee6d9a5d6275d4bc35bf79d2749d4fcce69b9 Mon Sep 17 00:00:00 2001 From: SergeyEzhin Date: Fri, 9 Jul 2021 19:04:06 +0300 Subject: [PATCH] [DE PE SSE mobile] Fix Bug 51134 --- .../mobile/lib/view/collaboration/Comments.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/common/mobile/lib/view/collaboration/Comments.jsx b/apps/common/mobile/lib/view/collaboration/Comments.jsx index 51ba84b62..eb520b3e3 100644 --- a/apps/common/mobile/lib/view/collaboration/Comments.jsx +++ b/apps/common/mobile/lib/view/collaboration/Comments.jsx @@ -578,7 +578,7 @@ const pickLink = (message) => { if (result) subStr = subStr.substring(0, result.index); offset = arguments[arguments.length-2]; - arrayComment.push({start: offset, end: subStr.length+offset, str: `${subStr}`}); + arrayComment.push({start: offset, end: subStr.length+offset, str: window.open(subStr)} href={subStr} target="_blank" data-can-copy="true">{subStr}}); return ''; }); @@ -595,7 +595,7 @@ const pickLink = (message) => { (offset<=item.start) && (offset+len>item.start)); }); if (!elem) - arrayComment.push({start: offset, end: len+offset, str: `${subStr}`}); + arrayComment.push({start: offset, end: len+offset, str: window.open(ref)} href={ref} target="_blank" data-can-copy="true">{subStr}}); return ''; }); @@ -608,20 +608,20 @@ const pickLink = (message) => { (offset<=item.start) && (offset+len>item.start)); }); if (!elem) - arrayComment.push({start: offset, end: len+offset, str: `${subStr}`}); + arrayComment.push({start: offset, end: len+offset, str: window.open(ref)} href={ref}>{subStr}}); return ''; }); arrayComment = arrayComment.sort(function(item1,item2){ return item1.start - item2.start; }); - let str_res = (arrayComment.length>0) ? (Common.Utils.String.htmlEncode(message.substring(0, arrayComment[0].start)) + arrayComment[0].str) : Common.Utils.String.htmlEncode(message); + let str_res = (arrayComment.length>0) ? : ; for (var i=1; i{str_res}{Common.Utils.String.htmlEncode(message.substring(arrayComment[i-1].end, arrayComment[i].start))}{arrayComment[i].str}; } if (arrayComment.length>0) { - str_res += Common.Utils.String.htmlEncode(message.substring(arrayComment[i-1].end, message.length)); + str_res = ; } return str_res;