Commit 9a9835dd authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

Bug 28882 - Две и более гиперссылки в одной ячейке сохраняют стиль гиперссылки...

Bug 28882 - Две и более гиперссылки в одной ячейке сохраняют стиль гиперссылки при добавлении, но становятся не валидными

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61616 954022d7-b5bf-4e40-9824-e11837661b57
parent f9cd4f14
...@@ -3238,14 +3238,14 @@ CCellValue.prototype = ...@@ -3238,14 +3238,14 @@ CCellValue.prototype =
} }
} }
} }
if(0 == val.indexOf("http://") || 0 == val.indexOf("https://") || (0 == val.indexOf("www.") && val.length > 4)) if((0 == val.indexOf("http://") || 0 == val.indexOf("https://") || (0 == val.indexOf("www.") && val.length > 4)) && -1 == val.indexOf("\n"))
{ {
var sRealUrl = val; var sRealUrl = val;
if(0 != val.indexOf("http://") && 0 != val.indexOf("https://")) if(0 != val.indexOf("http://") && 0 != val.indexOf("https://"))
sRealUrl = "http://" + sRealUrl; sRealUrl = "http://" + sRealUrl;
var oNewHyperlink = new Hyperlink(); var oNewHyperlink = new Hyperlink();
oNewHyperlink.Ref = cell.ws.getCell3(cell.nRow, cell.nCol); oNewHyperlink.Ref = cell.ws.getCell3(cell.nRow, cell.nCol);
oNewHyperlink.Hyperlink = sRealUrl; oNewHyperlink.Hyperlink = encodeURI(sRealUrl);
oNewHyperlink.Ref.setHyperlink(oNewHyperlink); oNewHyperlink.Ref.setHyperlink(oNewHyperlink);
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment