easy-template-x 3.0.3 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -561,7 +561,7 @@ const XmlNode = {
561
561
  const attributeNames = Object.keys(node.attributes);
562
562
 
563
563
  if (attributeNames.length) {
564
- attributes = ' ' + attributeNames.map(name => `${name}="${node.attributes[name]}"`).join(' ');
564
+ attributes = ' ' + attributeNames.map(name => `${name}="${this.encodeValue(node.attributes[name] || '')}"`).join(' ');
565
565
  }
566
566
  } // open tag
567
567
 
@@ -3307,7 +3307,7 @@ class TemplateHandler {
3307
3307
  constructor(options) {
3308
3308
  var _this$options$extensi, _this$options$extensi2, _this$options$extensi3, _this$options$extensi4;
3309
3309
 
3310
- _defineProperty(this, "version", "3.0.3" );
3310
+ _defineProperty(this, "version", "3.0.4" );
3311
3311
 
3312
3312
  _defineProperty(this, "xmlParser", new XmlParser());
3313
3313
 
@@ -534,7 +534,7 @@ const XmlNode = {
534
534
  const attributeNames = Object.keys(node.attributes);
535
535
 
536
536
  if (attributeNames.length) {
537
- attributes = ' ' + attributeNames.map(name => `${name}="${node.attributes[name]}"`).join(' ');
537
+ attributes = ' ' + attributeNames.map(name => `${name}="${this.encodeValue(node.attributes[name] || '')}"`).join(' ');
538
538
  }
539
539
  } // open tag
540
540
 
@@ -3280,7 +3280,7 @@ class TemplateHandler {
3280
3280
  constructor(options) {
3281
3281
  var _this$options$extensi, _this$options$extensi2, _this$options$extensi3, _this$options$extensi4;
3282
3282
 
3283
- _defineProperty(this, "version", "3.0.3" );
3283
+ _defineProperty(this, "version", "3.0.4" );
3284
3284
 
3285
3285
  _defineProperty(this, "xmlParser", new XmlParser());
3286
3286
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-template-x",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Generate docx documents from templates, in Node or in the browser.",
5
5
  "keywords": [
6
6
  "docx",
@@ -88,7 +88,7 @@ export const XmlNode = {
88
88
  const attributeNames = Object.keys(node.attributes);
89
89
  if (attributeNames.length) {
90
90
  attributes = ' ' + attributeNames
91
- .map(name => `${name}="${node.attributes[name]}"`)
91
+ .map(name => `${name}="${this.encodeValue(node.attributes[name] || '')}"`)
92
92
  .join(' ');
93
93
  }
94
94
  }