Text elements that include special charaters are being incorrectly exported. For instance, when I have text elements with the text <trigger>, the generated SVG is
<text transform="matrix(1,0,0,1,0,0)" style="text-anchor: end; font: normal normal normal 10px/normal Arial;" x="161" y="31.5" text-anchor="end" font="10px "Arial"" stroke="none" fill="#000"><tspan dy="3.634615384615385"><trigger></tspan></text>
That <trigger> tag is parsed as a regular SVG tag, and isn't displayed in the resulting SVG image.
In the 'text' serializer, line 209, I've replaced
tags.push(tag(
'text',
attrs,
node.matrix,
tag('tspan', {
dy: computeTSpanDy(style.font.size, line + 1, totalLines)
}, null, text.replace(/&/g, "&"))
));
with
tags.push(tag(
'text',
attrs,
node.matrix,
tag('tspan', {
dy: computeTSpanDy(style.font.size, line + 1, totalLines)
}, null, escapeXML(text.replace(/&/g, "&")))
));
and that seems to do the trick, thus far.