Socket
Socket
Sign inDemoInstall

moddle-xml

Package Overview
Dependencies
Maintainers
3
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moddle-xml - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

2

lib/writer.js

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc