From 0b3d221b5bbe961364943ac0a3b0218097f703df Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 26 Mar 2021 23:46:57 +0300 Subject: [PATCH] Fix Bug 49256 --- apps/documenteditor/main/app/view/DocumentHolder.js | 2 ++ apps/presentationeditor/main/app/view/DocumentHolder.js | 2 ++ .../main/app/controller/DocumentHolder.js | 9 ++++----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 7c774f1f5..00b77361d 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -501,6 +501,8 @@ define([ var hyperProps = moveData.get_Hyperlink(); if (!hyperProps) return; ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip(); + if (ToolTip.length>256) + ToolTip = ToolTip.substr(0, 256) + '...'; } else if (type == Asc.c_oAscMouseMoveDataTypes.Footnote) { ToolTip = moveData.get_FootnoteText(); if (ToolTip.length>1000) diff --git a/apps/presentationeditor/main/app/view/DocumentHolder.js b/apps/presentationeditor/main/app/view/DocumentHolder.js index f0d3a45bb..a56de3cf0 100644 --- a/apps/presentationeditor/main/app/view/DocumentHolder.js +++ b/apps/presentationeditor/main/app/view/DocumentHolder.js @@ -491,6 +491,8 @@ define([ ToolTip = (_.isEmpty(hyperProps.get_ToolTip())) ? hyperProps.get_Value() : hyperProps.get_ToolTip(); ToolTip = Common.Utils.String.htmlEncode(ToolTip); + if (ToolTip.length>256) + ToolTip = ToolTip.substr(0, 256) + '...'; if (screenTip.tipLength !== ToolTip.length || screenTip.strTip.indexOf(ToolTip)<0 ) { screenTip.toolTip.setTitle(ToolTip + '
' + me.txtPressLink + ''); diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index eb9d245aa..c7451ee85 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -1114,11 +1114,10 @@ define([ if (props.asc_getType() == Asc.c_oAscHyperlinkType.WebLink) { var linkstr = props.asc_getTooltip(); - if (linkstr) { - linkstr = Common.Utils.String.htmlEncode(linkstr) + '
' + me.textCtrlClick + ''; - } else { - linkstr = Common.Utils.String.htmlEncode(props.asc_getHyperlinkUrl()) + '
' + me.textCtrlClick + ''; - } + linkstr = (linkstr) ? linkstr : props.asc_getHyperlinkUrl(); + if (linkstr.length>256) + linkstr = linkstr.substr(0, 256) + '...'; + linkstr = Common.Utils.String.htmlEncode(linkstr) + '
' + me.textCtrlClick + ''; } else { linkstr = Common.Utils.String.htmlEncode(props.asc_getTooltip() || (props.asc_getLocation())); linkstr += '
' + me.textCtrlClick + '';