Commit 81b9be12 authored by ximing's avatar ximing Committed by 马金花儿

fix 导出为png的时候 由于包含控制字符 xhrLoadImage会报错,导致导出一张空白图片

parent c75a3ed0
...@@ -105,8 +105,8 @@ define(function(require, exports, module) { ...@@ -105,8 +105,8 @@ define(function(require, exports, module) {
svgXml = svgXml.replace(' xmlns="http://www.w3.org/2000/svg" ' + svgXml = svgXml.replace(' xmlns="http://www.w3.org/2000/svg" ' +
'xmlns:NS1="" NS1:ns1:xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:NS2="" NS2:xmlns:ns1=""', ''); 'xmlns:NS1="" NS1:ns1:xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:NS2="" NS2:xmlns:ns1=""', '');
// svg 含有   符号导出报错 Entity 'nbsp' not defined // svg 含有   符号导出报错 Entity 'nbsp' not defined ,含有控制字符触发Load Image 会触发报错
svgXml = svgXml.replace(/ /g, ' '); svgXml = svgXml.replace(/ |[\x00-\x1F\x7F-\x9F]/g, "");
// fix title issue in safari // fix title issue in safari
// @ http://stackoverflow.com/questions/30273775/namespace-prefix-ns1-for-href-on-tagelement-is-not-defined-setattributens // @ http://stackoverflow.com/questions/30273775/namespace-prefix-ns1-for-href-on-tagelement-is-not-defined-setattributens
......
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