From 5db5f045b84ab8f21656291588cbf778280e5be8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 23 Jul 2012 14:08:30 +0800 Subject: [PATCH] plugins/raphael.export.js --- plugins/raphael.export.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/raphael.export.js b/plugins/raphael.export.js index c56c819..22a4d65 100644 --- a/plugins/raphael.export.js +++ b/plugins/raphael.export.js @@ -82,7 +82,9 @@ }).join(' '); } - return '<' + name + ( matrix ? ' transform="matrix(' + matrix.toString().replace(/^matrix\(|\)$/g, '') + ')" ' : ' ' ) + attrs + '>' + content + ''; + return '<' + name + ( matrix ? ' transform="matrix(' + matrix.toString().replace(/^matrix\(|\)$/g, '') + ')" ' : ' ' ) + attrs + '>' + + escapeXML(content) + + ''; } /** @@ -143,7 +145,13 @@ { style: 'text-anchor: middle; ' + styleToString(style) + ';' } ), node.matrix, - tag('tspan', { dy: computeTSpanDy(style.font.size, line + 1, node.attrs['text'].split('\n').length) }, null, text) + tag('tspan', + { + dy: computeTSpanDy(style.font.size, line + 1, node.attrs['text'].split('\n').length) + }, + null, + text + ) )); }); -- 2.39.2