The existing check for whether the tilesource data is XML or JSON
looks for a tag anywhere in the response content, which incorrectly
flags the content as XML in the case where it is really JSON with
XML embedded in it.
This commit corrects that problem by requiring the tag to occur as
the first non-whitespace part of the content. This is basically a
poor person's well-formedness check since well-formed XML cannot
have non-whitespace content outside of the root node.
N.B. While malformed XML content with non-whitespace characters
before the first element has been getting identified as XML, it
has not been getting parsed correctly. With current parsing
infrastructure, the content has been getting replaced by a parsing
error message. With more up-to-date parsing infrastructure, it
will throw an error. Either way we're not losing anything by failing
to identify malformed XML as XML.
Addresses issue #2325.
This commit adds a new set of tests for IIIFv3 Image API info
to the `formats` tests. These tests mirror the tests done for the v2
handler, but with updated 'info.json' files.
Image directories also needed to be changed to include the full width/height
parameters.
Also changed was moving the `iiif` test block up below formats, and adding a QUnit
module name. This allowed the tests to show up in the QUnit browser test.
All of the new tests were checked and pass.