}).join(' ');
}
- return '<' + name + ( matrix ? ' transform="matrix(' + matrix.toString().replace(/^matrix\(|\)$/g, '') + ')" ' : ' ' ) + attrs + '>' + content + '</' + name + '>';
+ return '<' + name + ( matrix ? ' transform="matrix(' + matrix.toString().replace(/^matrix\(|\)$/g, '') + ')" ' : ' ' ) + attrs + '>' +
+ escapeXML(content) +
+ '</' + name + '>';
}
/**
{ 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
+ )
));
});