Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Fixed missing conversion on Issue #26 for '?'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasPrang authored Feb 16, 2019
1 parent f0376f2 commit 690fdec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/js2xml.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function writeAttributes(attributes, options, depth) {
quote = options.noQuotesForNativeAttributes && typeof attributes[key] !== 'string' ? '' : '"';
attr = '' + attributes[key]; // ensure number and boolean are converted to String
attr = attr.replace(/"/g, '"');
attr = attr.replace(/[&]/g, '&')
attrName = 'attributeNameFn' in options ? options.attributeNameFn(key, attr, currentElementName, currentElement) : key;
result.push((options.spaces && options.indentAttributes? writeIndentation(options, depth+1, false) : ' '));
result.push(attrName + '=' + quote + ('attributeValueFn' in options ? options.attributeValueFn(attr, key, currentElementName, currentElement) : attr) + quote);
Expand Down

0 comments on commit 690fdec

Please sign in to comment.