Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kityminder-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
吴志俊
kityminder-core
Commits
81b9be12
Commit
81b9be12
authored
Mar 19, 2018
by
ximing
Committed by
马金花儿
Mar 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 导出为png的时候 由于包含控制字符 xhrLoadImage会报错,导致导出一张空白图片
parent
c75a3ed0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
png.js
src/protocol/png.js
+2
-2
No files found.
src/protocol/png.js
View file @
81b9be12
...
@@ -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
(
/
|
[\x
00-
\x
1F
\x
7F-
\x
9F
]
/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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment