aboutsummaryrefslogtreecommitdiff
path: root/tests/documents.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-03-29 20:45:53 +0000
committerMichael Williamson <mike@zwobble.org>2013-03-29 20:45:53 +0000
commit1413e67cdde7dc349c098c670d8590cc8e04b004 (patch)
tree044e85c273a49dd8c53ac0f06dd686f22b234165 /tests/documents.tests.js
parente3891290bd3034d0ce8034387ffab1e5a9793a70 (diff)
HTML escape text
Diffstat (limited to 'tests/documents.tests.js')
-rw-r--r--tests/documents.tests.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/documents.tests.js b/tests/documents.tests.js
index a5e81af..7161377 100644
--- a/tests/documents.tests.js
+++ b/tests/documents.tests.js
@@ -16,6 +16,16 @@ describe('DocumentConverter', function() {
});
});
+ test('text is HTML-escaped', function() {
+ var document = new documents.Document([
+ paragraphOfText("1 < 2")
+ ]);
+ var converter = new DocumentConverter();
+ return converter.convertToHtml(document).then(function(result) {
+ assert.equal("<p>1 &lt; 2</p>", result.html);
+ });
+ });
+
test('should convert document containing multiple paragraphs to multiple p elements', function() {
var document = new documents.Document([
paragraphOfText("Hello."),