Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
155dbad0
Commit
155dbad0
authored
Dec 17, 2012
by
Rick Waldron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.0: Reduced parseXML
Signed-off-by:
Rick Waldron
<
waldron.rick@gmail.com
>
parent
338eaf61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
core.js
src/core.js
+7
-10
No files found.
src/core.js
View file @
155dbad0
...
...
@@ -486,19 +486,16 @@ jQuery.extend({
if
(
!
data
||
typeof
data
!==
"string"
)
{
return
null
;
}
// IE9 will throw on ill-formed XML
try
{
if
(
window
.
DOMParser
)
{
// Standard
tmp
=
new
DOMParser
();
xml
=
tmp
.
parseFromString
(
data
,
"text/xml"
);
}
else
{
// IE
xml
=
new
ActiveXObject
(
"Microsoft.XMLDOM"
);
xml
.
async
=
"false"
;
xml
.
loadXML
(
data
);
}
}
catch
(
e
)
{
tmp
=
new
DOMParser
();
xml
=
tmp
.
parseFromString
(
data
,
"text/xml"
);
}
catch
(
e
)
{
xml
=
undefined
;
}
if
(
!
xml
||
!
xml
.
documentElement
||
xml
.
getElementsByTagName
(
"parsererror"
).
length
)
{
if
(
!
xml
||
xml
.
getElementsByTagName
(
"parsererror"
).
length
)
{
jQuery
.
error
(
"Invalid XML: "
+
data
);
}
return
xml
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment