# HG changeset patch # User Nicholas Jillings # Date 1474448107 -3600 # Node ID 23c3909023785632b570b7942042f8ba5c80a036 # Parent 32366178b6a81eb8b77c051e40fb0305b4bed34c Fixed copying title and first interface axis title if has no title node defined diff -r 32366178b6a8 -r 23c390902378 js/specification.js --- a/js/specification.js Tue Sep 20 17:55:56 2016 +0100 +++ b/js/specification.js Wed Sep 21 09:55:07 2016 +0100 @@ -495,13 +495,13 @@ // Get the title var title = xml.getElementsByTagName('title'); - if (title.length != 0) { + if (title.length != 0 && title[0].parentElement == xml) { this.title = title[0].textContent; } // Get the Comment Box Prefix var CBP = xml.getElementsByTagName('commentboxprefix'); - if (CBP.length != 0) { + if (CBP.length != 0 && CBP[0].parentElement == xml) { this.commentBoxPrefix = CBP[0].textContent; } diff -r 32366178b6a8 -r 23c390902378 tests/examples/project.xml --- a/tests/examples/project.xml Tue Sep 20 17:55:56 2016 +0100 +++ b/tests/examples/project.xml Wed Sep 21 09:55:07 2016 +0100 @@ -1,6 +1,6 @@ - + Please enter your name. @@ -94,7 +94,7 @@ - Comment on fragment + Comment on fragment Example Test Question