Skip to content

Commit

Permalink
added href to sanatize-test
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfganggreschus committed Apr 17, 2024
1 parent ca33b28 commit cdef258
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ describe('SanitizeHtmlTransformer Decorator', () => {
it('should remove all html but rich text ck5 tags', () => {
const plainString = {
contentCk5:
'<h1></h1><h2><b><mark>html <h4>text</h4></mark></b></h2><span class="math-tex">[x=\frac{-bpmsqrt{b^2-4ac}}{2a}]</span><scriPT>alert("foobar");</sCript><stYle></style><img src="some.png" />',
'<h1></h1><h2><b><mark>html <h4>text</h4></mark></b></h2><span class="math-tex">[x=\frac{-bpmsqrt{b^2-4ac}}{2a}]</span><scriPT>alert("foobar");</sCript><stYle></style><img src="some.png" /><a href></a>',
};
const instance = plainToClass(WithHtmlDto, plainString);
expect(instance.contentCk5).toEqual(
'<b><mark>html <h4>text</h4></mark></b><span class="math-tex">[x=\frac{-bpmsqrt{b^2-4ac}}{2a}]</span>'
'<b><mark>html <h4>text</h4></mark></b><span class="math-tex">[x=\frac{-bpmsqrt{b^2-4ac}}{2a}]</span><a href></a>'
);
});
});
Expand Down

0 comments on commit cdef258

Please sign in to comment.