xml-crypto
xml-crypto copied to clipboard
attribute value normalization in Canonicalization Algorithm
With Reference to https://www.w3.org/TR/xml/#AVNormalize we need to append a space character (#x20) for a white space character (#x20, #xD, #xA, #x9) to the normalized value. But we are also replacing multiple spaces by single space. Need a small change in encodeSpecialCharactersInAttribute fn.
Existing code:
.replace(/[\r\n\t ]+/g, ' ')
Code change required:
.replace(/[\r\n\t ]/g, ' ')
@gtkirankumar31 , I see that you created a PR for this issue, which wasn't merged. It would be helpful if the PR included a test suite. If you're willing do so that, please reply here and we'll reopen the PR and continue work on this.