Correctly deal with invalid content in non-selfclosing tags. Fixes #297

This commit is contained in:
Tom MacWright 2013-09-11 11:18:40 -04:00 committed by Sandro Santilli
parent 6745bdf634
commit 761b05b599
3 changed files with 7 additions and 2 deletions

View File

@ -128,8 +128,8 @@ tree.Definition.prototype.symbolizersToXML = function(env, symbolizers, zoom) {
} }
if (selfclosing) { if (selfclosing) {
xml += '/>\n'; xml += '/>\n';
} else { } else if (tagcontent) {
if (tagcontent.indexOf('<Format') != -1) { if (tagcontent.indexOf('<') != -1) {
xml += '>' + tagcontent + '</' + name + '>\n'; xml += '>' + tagcontent + '</' + name + '>\n';
} else { } else {
xml += '><![CDATA[' + tagcontent + ']]></' + name + '>\n'; xml += '><![CDATA[' + tagcontent + ']]></' + name + '>\n';

View File

@ -0,0 +1,4 @@
#t {
text-name: invalid;
text-face-name: "Dejagnu";
}

View File

@ -0,0 +1 @@
issue297.mss:2:2 Invalid value for text-name, the type expression is expected. invalid (of type keyword) was given.