mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-05 07:03:24 +01:00
Hack for IE.
This commit is contained in:
parent
1265d978e8
commit
666cf329a8
@ -137,8 +137,13 @@ public class ExporterFactory {
|
|||||||
private Document normalizeSvg(@NotNull String svgXml, boolean embedImg) throws XMLStreamException, ParserConfigurationException, IOException, SAXException, TransformerException {
|
private Document normalizeSvg(@NotNull String svgXml, boolean embedImg) throws XMLStreamException, ParserConfigurationException, IOException, SAXException, TransformerException {
|
||||||
|
|
||||||
final DocumentBuilder documentBuilder = getDocumentBuilder();
|
final DocumentBuilder documentBuilder = getDocumentBuilder();
|
||||||
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
if (svgXml.trim().startsWith("<svg xmlns=\"http://www.w3.org/2000/svg\"")) {
|
||||||
// @Todo: This must not happen...
|
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
||||||
|
} else {
|
||||||
|
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hacks for some legacy cases ....
|
||||||
svgXml = svgXml.replaceAll("NaN,", "0");
|
svgXml = svgXml.replaceAll("NaN,", "0");
|
||||||
svgXml = svgXml.replaceAll(",NaN", "0");
|
svgXml = svgXml.replaceAll(",NaN", "0");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user