diff --git a/editor/locale/locale.js b/editor/locale/locale.js index 2ad5db89..214b038a 100644 --- a/editor/locale/locale.js +++ b/editor/locale/locale.js @@ -44,9 +44,9 @@ var put_locale = function(svgCanvas, given_param){ if(data.title) elem.title = data.title; if(data.textContent) { - // Only replace text nodes, not elements + // Only replace non-empty text nodes, not elements $.each(elem.childNodes, function(j, node) { - if(node.nodeType == 3) { + if(node.nodeType == 3 && $.trim(node.textContent)) { node.textContent = data.textContent; } }); diff --git a/editor/svg-editor.html b/editor/svg-editor.html index 95f14d4f..2fea9dc2 100644 --- a/editor/svg-editor.html +++ b/editor/svg-editor.html @@ -87,7 +87,7 @@ script type="text/javascript" src="locale/locale.min.js">