Skip to content

Commit

Permalink
remove unnecessary escape characters
Browse files Browse the repository at this point in the history
  • Loading branch information
bariscanyilmaz committed Apr 4, 2023
1 parent 7775353 commit b217261
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ describe('SafeHtmlPipe', () => {
it('should sanitize unsafe HTML content', () => {
const input = `<script>alert("hello world");</script><p><a href='#' onclick="alert('This is an XSS attack!')">Click here!</a></p>`;
const result = pipe.transform(input);
expect(result).toBe(`<p><a href=\"#\">Click here!</a></p>`);
expect(result).toBe(`<p><a href="#">Click here!</a></p>`);
});
});

0 comments on commit b217261

Please sign in to comment.