diff --git a/packages/core/src/api/sync/merger.ts b/packages/core/src/api/sync/merger.ts
index 0ac222341..4cbffa450 100644
--- a/packages/core/src/api/sync/merger.ts
+++ b/packages/core/src/api/sync/merger.ts
@@ -215,7 +215,7 @@ export async function handleInboxItems(
JSON.parse(decryptedItem)
);
if (!validation.success) {
- logger.info("Failed to validate inbox item.", {
+ logger.warn("Failed to validate inbox item.", {
inboxItem: item,
errors: validation.error.issues
});
diff --git a/packages/core/src/utils/__tests__/html-parser.test.ts b/packages/core/src/utils/__tests__/html-parser.test.ts
index 4ffe935d4..b30fe685d 100644
--- a/packages/core/src/utils/__tests__/html-parser.test.ts
+++ b/packages/core/src/utils/__tests__/html-parser.test.ts
@@ -16,7 +16,7 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
Hello world
"); + expect(result).toContain("world"); + expect(result).toContain("
test
"); + expect(typeof result).toBe("string"); + }); + + it("handles empty input without throwing", () => { + expect(() => sanitizeHtml("")).not.toThrow(); + const result = sanitizeHtml(""); + expect(typeof result).toBe("string"); + }); + + it("handles plain text without throwing", () => { + const result = sanitizeHtml("just plain text"); + expect(result).toContain("just plain text"); + expect(typeof result).toBe("string"); + }); + + it("handles deeply nested XSS attempts", () => { + const result = sanitizeHtml( + "hover