mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-09 00:43:23 +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();
|
||||||
|
if (svgXml.trim().startsWith("<svg xmlns=\"http://www.w3.org/2000/svg\"")) {
|
||||||
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
svgXml = svgXml.replaceFirst("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ");
|
||||||
// @Todo: This must not happen...
|
} 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