-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xml entity encoding for more characoters (#3733)
XML entity encoding for carriage return, line feed, next line, and line separator characters
- Loading branch information
1 parent
bfb22c7
commit e9352e4
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "bugfix", | ||
"category": "Serializer", | ||
"description": "XML entity encoding for carriage return, line feed, next line, and line separator characters" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
var escapeElement = require('../../lib/xml/escape-element').escapeElement; | ||
|
||
describe('escape-element', function() { | ||
it('escapes: & < >', function() { | ||
var value = 'abc 123 &<>"%'; | ||
expect(escapeElement(value)).to.equal('abc 123 &<>"%'); | ||
it('escapes: & < > \\r \\n \u0085\u2028', function() { | ||
var value = 'abc 123 &<>"%\r\n\u0085\u2028'; | ||
expect(escapeElement(value)).to.equal('abc 123 &<>"%
…
'); | ||
}); | ||
}); |