Skip to content

@hgoebl /gist:1503453
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
handle non-utf8 encoded XML files
case S.PROC_INST_ENDING:
if (c === ">") {
emitNode(parser, "onprocessinginstruction", {
name : parser.procInstName,
body : parser.procInstBody
})
if (parser.procInstName === "xml") {
var match = parser.procInstBody.match(/encoding\s*=\s*['"]([A-Za-z_0-9-]+)['"]/)
if (match) parser.encoding = match[1]
}
parser.procInstName = parser.procInstBody = ""
parser.state = S.TEXT
} else {
parser.procInstBody += "?" + c
parser.state = S.PROC_INST_BODY
}
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.