symbolizersToXML: Do not assume tagcontent has a value

Fixes #297

Includes testcase
master-undefined-tagcontent
Sandro Santilli 11 years ago
parent 2ead8dafa2
commit 236d64ec14

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

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

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