diff --git a/common/entity.js b/common/entity.js index 8472a1bd..c3c718c4 100644 --- a/common/entity.js +++ b/common/entity.js @@ -4,6 +4,7 @@ const Entities = { ' ': ' ', '<': '<', '>': '>', + '"': '"', }; const keys = Object.keys(Entities); diff --git a/test/common/entity.js b/test/common/entity.js index 0c1d82ae..43b54d48 100644 --- a/test/common/entity.js +++ b/test/common/entity.js @@ -19,3 +19,11 @@ test('cloudcmd: entity: decode', (t) => { t.end(); }); +test('cloudcmd: entity: encode', (t) => { + const result = entity.encode('"hello"'); + const expected = '"hello"'; + + t.equal(result, expected, 'should encode entity'); + t.end(); +}); +