Skip to content

Special character in SVG-text-nodes will cause a XML error 5617 #4

@herr-barus

Description

@herr-barus

Special character like öäüß in SVG-text-nodes will cause a XML error 5617 when using window.btoa for base64 encoding.
console:
SVG.toDataURL: using native renderer for png export. THIS MIGHT FAIL.
SVG.toDataURL: using standard XMLSerializer.serializeToString
SVG.toDataURL: using window.btoa for base64 encoding
XML5617: Ungültiges XML-Zeichen. Zeile: 9, Spalte 163

Forcing a custom encoding using the base64.js will work in actual FF, Chrome & Opera, but throws a SecurityError in IE in line 95 of svg_todataurl.js.
console:
SVG.toDataURL: using native renderer for png export. THIS MIGHT FAIL.
SVG.toDataURL: using standard XMLSerializer.serializeToString
SVG.toDataURL: using custom base64 encoder
SVG.toDataURL: exported image size: 0,0
SCRIPT5022: SecurityError Datei: svg_todataurl.js, Zeile: 95, Spalte: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions