it("treats $ in display name as literal (no replacement-pattern interpolation)", () => { const ctx = parseFeishuMessageEvent(
makeEvent("@_user_1 hi", [{ key: "@_user_1", name: "$& the user", id: { open_id: "ou_x" } }]),
BOT_OPEN_ID,
); // $ is preserved literally (no $& pattern substitution); & is not escaped in tag body
expect(ctx.content).toBe('<at user_id="ou_x">$& the user</at> hi');
});
it("escapes < and > in mention name to protect tag structure", () => { const ctx = parseFeishuMessageEvent(
makeEvent("@_user_1 test", [{ key: "@_user_1", name: "<script>", id: { open_id: "ou_x" } }]),
BOT_OPEN_ID,
);
expect(ctx.content).toBe('<at user_id="ou_x"><script></at> test');
});
});
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.