diff options
-rw-r--r-- | org/madore/damlengine/TodoWeblogSelectionElement.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org/madore/damlengine/TodoWeblogSelectionElement.java b/org/madore/damlengine/TodoWeblogSelectionElement.java index 846f1b5..1a342ba 100644 --- a/org/madore/damlengine/TodoWeblogSelectionElement.java +++ b/org/madore/damlengine/TodoWeblogSelectionElement.java @@ -176,6 +176,13 @@ public final class TodoWeblogSelectionElement extends TodoDefaultElement { = (DOMImplementationLS)ctx.doc.getImplementation(); LSParser par = domi.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null); LSInput input = domi.createLSInput(); + if ( esum.titleXml == null ) { + // If there is no title, use number instead. + str = String.format("%04d", ((Context.WeblogSingleSelectionContext)(ctx.wsc)).number); + Node strNode = ctx.doc.createTextNode(str); + span.appendChild(strNode); + break; // Leave now! + } input.setStringData(esum.titleXml); Document temp = par.parse(input); Node titleNode = ctx.doc.adoptNode(temp.getDocumentElement()); |