Browse Source
Merge pull request #16170 from abpframework/fix/16169
Fix/16169 safe html pipe lint error
pull/16179/head
Masum ULU
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
npm/ng-packs/packages/core/src/lib/tests/safe-html.pipe.spec.ts
|
|
@ -29,6 +29,6 @@ describe('SafeHtmlPipe', () => { |
|
|
it('should sanitize unsafe HTML content', () => { |
|
|
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 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); |
|
|
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>`); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
|