mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
feat(xml parser): Only allow angular syntax extensions if configured.
Configure via the public `angularSyntax` property on EasySAXParser and the XmlParser wrapper.
This commit is contained in:
@ -15,6 +15,7 @@ describe("angular xml parser", () => {
|
||||
break;
|
||||
}
|
||||
});
|
||||
parser.angularSyntax = true;
|
||||
});
|
||||
|
||||
it("parses [property] binding", () => {
|
||||
@ -53,7 +54,6 @@ describe("angular xml parser", () => {
|
||||
assert.equal(last_attrs['text'], 'Name');
|
||||
});
|
||||
|
||||
return
|
||||
it("detects equals without value", () => {
|
||||
parser.parse("<TextField brokenTag= />");
|
||||
|
||||
@ -71,4 +71,11 @@ describe("angular xml parser", () => {
|
||||
|
||||
assert.isFalse(last_attrs);
|
||||
});
|
||||
|
||||
it("rejects angular properties if syntax disabled", () => {
|
||||
parser.angularSyntax = false;
|
||||
parser.parse("<TextField [text]='somevalue' />");
|
||||
|
||||
assert.isFalse(last_attrs);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user