diff --git a/index.html b/index.html
index 4a60cc17..4ae003e0 100644
--- a/index.html
+++ b/index.html
@@ -42,9 +42,7 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
+ xmlns:svg="http://www.w3.org/2000/svg">
diff --git a/modules/ui/emblems-editor.js b/modules/ui/emblems-editor.js
index 679c33d3..83758d66 100644
--- a/modules/ui/emblems-editor.js
+++ b/modules/ui/emblems-editor.js
@@ -238,8 +238,26 @@ function editEmblem(type, id, el) {
const svg = ``;
defs.insertAdjacentHTML("beforeend", svg);
} else {
- defs.insertAdjacentHTML("beforeend", result);
- const newEmblem = defs.lastChild; // new coa
+
+ const el = document.createElement("html");
+ el.innerHTML = result;
+
+ // remove sodipodi and inkscape attributes
+ el.querySelectorAll("*").forEach(el => {
+ const attributes = el.getAttributeNames();
+ attributes.forEach(attr => {
+ if (attr.includes("inkscape") || attr.includes("sodipodi")) el.removeAttribute(attr);
+ });
+ });
+
+ const g = el.querySelector("g");
+
+ if (!g) {
+ tip("The file should be prepated for load to FMG. Please use Armoria or other relevant tools", false, "error");
+ return;
+ }
+
+ const newEmblem = defs.appendChild(g);
newEmblem.id = id;
newEmblem.setAttribute("width", 200);
newEmblem.setAttribute("height", 200);