XLSX Comment Parse Safeguard [ci skip]

This commit is contained in:
reviewher 2021-09-11 00:13:02 -07:00
parent 297fd39563
commit f07a3d5fc0

View File

@ -23,7 +23,7 @@ function parse_comments_xml(data/*:string*/, opts)/*:Array<RawComment>*/ {
var rt = !!textMatch && !!textMatch[1] && parse_si(textMatch[1]) || {r:"",t:"",h:""};
comment.r = rt.r;
if(rt.r == "<t></t>") rt.t = rt.h = "";
comment.t = rt.t.replace(/\r\n/g,"\n").replace(/\r/g,"\n");
comment.t = (rt.t||"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");
if(opts.cellHTML) comment.h = rt.h;
commentList.push(comment);
});