fix: hyperlinks html entities (#9063)

This commit is contained in:
David Luzar 2025-01-29 19:02:54 +01:00 committed by GitHub
parent 52eaf64591
commit a3e1619635
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 30 deletions

View file

@ -1,4 +1,4 @@
import { isTransparent, sanitizeHTMLAttribute } from "../utils";
import { isTransparent } from "../utils";
describe("Test isTransparent", () => {
it("should return true when color is rgb transparent", () => {
@ -11,9 +11,3 @@ describe("Test isTransparent", () => {
expect(isTransparent("#ced4da")).toEqual(false);
});
});
describe("sanitizeHTMLAttribute()", () => {
it("should escape HTML attribute special characters & not double escape", () => {
expect(sanitizeHTMLAttribute(`&"'><`)).toBe("&amp;&quot;&#39;&gt;&lt;");
});
});