moddle-xml
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -138,3 +138,3 @@ 'use strict'; | ||
if (prop.type === 'String' && ESCAPE_CHARS.test(value)) { | ||
if (prop.type === 'String' && value.search(ESCAPE_CHARS) !== -1) { | ||
this.escape = true; | ||
@@ -141,0 +141,0 @@ } |
{ | ||
"name": "moddle-xml", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "XML import/export for documents described with moddle", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -514,2 +514,29 @@ 'use strict'; | ||
it('write body CDATA property in subsequent calls', function() { | ||
// given | ||
var writer = createWriter(model); | ||
var root1 = model.create('props:SimpleBody', { | ||
body: '<>' | ||
}); | ||
var root2 = model.create('props:SimpleBody', { | ||
body: '<>' | ||
}); | ||
// when | ||
var xml1 = writer.toXML(root1); | ||
var xml2 = writer.toXML(root2); | ||
var expectedXml = | ||
'<props:simpleBody xmlns:props="http://properties">' + | ||
'<![CDATA[<>]]>' + | ||
'</props:simpleBody>'; | ||
// then | ||
expect(xml1).to.eql(expectedXml); | ||
expect(xml2).to.eql(expectedXml); | ||
}); | ||
it('write body CDATA property with special chars', function() { | ||
@@ -516,0 +543,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119402
3410