Prevent annoying error message from CTX detectWeb() if page isn't valid XML
This commit is contained in:
parent
f4dfc13eab
commit
083b3ba9a9
1 changed files with 6 additions and 1 deletions
|
@ -129,7 +129,12 @@ function detectInString(text) {
|
|||
* specification.
|
||||
*/
|
||||
function contextObjectXMLToCOinS (text) {
|
||||
var doc = new XML(text);
|
||||
try {
|
||||
var doc = new XML(text);
|
||||
}
|
||||
catch (e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
/* Here and elsewhere, we are using the E4X syntax for XML */
|
||||
var objects = doc..*::["context-object"];
|
||||
|
|
Loading…
Reference in a new issue