From 1413e67cdde7dc349c098c670d8590cc8e04b004 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Fri, 29 Mar 2013 20:45:53 +0000 Subject: HTML escape text --- tests/documents.tests.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/documents.tests.js') 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("

1 < 2

", result.html); + }); + }); + test('should convert document containing multiple paragraphs to multiple p elements', function() { var document = new documents.Document([ paragraphOfText("Hello."), -- cgit v1.2.3