diff --git a/src/controllers/updateCell.js b/src/controllers/updateCell.js index 3981266..ec81914 100644 --- a/src/controllers/updateCell.js +++ b/src/controllers/updateCell.js @@ -217,7 +217,7 @@ export function luckysheetupdateCell(row_index1, col_index1, d, cover, isnotfocu if((value == null || value.toString() == "") && !cover){ value = "
"; } - + value = formula.xssDeal(value); if(!checkProtectionCellHidden(row_index, col_index, Store.currentSheetIndex) && value.length>0 && value.substr(0, 63)=='='){ $("#luckysheet-rich-text-editor").html(""); } diff --git a/src/global/formula.js b/src/global/formula.js index 57f36cb..71fda9c 100755 --- a/src/global/formula.js +++ b/src/global/formula.js @@ -321,7 +321,11 @@ const luckysheetformula = { sheetmanage.changeSheetExec(_this.rangetosheet); } }, - fucntionboxshow: function (r, c) { + xssDeal: function(str) { + if (typeof str !== 'string') return str; + return str.replace(/