var Export = (function ()
{
    var svg_element
    var file_name
    var style_url
    var styles

    function get_styles()
    {
        $.ajax({
            url: style_url,
            type: 'GET',
            success: function(code)
            {
                styles = code
                publicSpace.export_svg()
            }
        })
    }

    var publicSpace = {

        init: function(element, title, style_address)
        {
            svg_element = element
            file_name = title
            style_url = style_address

            $('.export_svg').click(publicSpace.export_svg)
            $('.export_print').click(publicSpace.export_print)

        },
        export_svg: function()
        {
            if(style_url && styles === undefined)
            {
                get_styles()
                return
            }

            element_code = svg_element.innerHTML

            if(!element_code.match(/<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/))
            {
                element_code = element_code.replace(
                    /<svg/,
                    '<svg xmlns="http://www.w3.org/2000/svg"'
                )
            }

            var css = ''
            if(styles)
                css += styles
            element_code = element_code.replace(
                /<svg(.*?)>/,
                '<svg $1><style>/* <![CDATA[ */\n' + css + '\n/* ]]> */\n</style>'
            )
            var svg_blob = new Blob(
                [element_code],
                {type: 'image/svg+xml;charset=utf-8'}
            )
            var svg_content_url = URL.createObjectURL(svg_blob)
            var temp_link = document.createElement('a')
            temp_link.href = svg_content_url
            temp_link.style.display = 'none'
            temp_link.download = file_name + '.svg'
            document.body.appendChild(temp_link)
            temp_link.click()
            document.body.removeChild(temp_link)

            event.preventDefault()
        },
        export_print: function()
        {
            window.print()
            event.preventDefault()
        }
    }

    return publicSpace
}())

@@ -1166,32 +1166,302 @@
  )%0A            %7D
+%0A            if(!element_code.match(/%3Csvg%5B%5E%3E%5D+%22http%5C:%5C/%5C/www%5C.w3%5C.org%5C/1999%5C/xlink%22/))%7B%0A                element_code = element_code.replace(%0A                    /%3Csvg/,%0A                    '%3Csvg xmlns:xlink=%22http://www.w3.org/1999/xlink%22'%0A                )%0A            %7D
 %0A%0A            va
@@ -1634,16 +1634,32 @@
 1%3E%3Cstyle
+ type=%22text/css%22
 %3E/* %3C!%5BC

Add more comaptibility strings