Skip to main content
Glama
escape.spec.ts497 B
import { describe, it, expect } from "vitest"; import * as entities from "./index.js"; describe("escape HTML", () => { it("should escape HTML attribute values", () => expect(entities.escapeAttribute('<a " attr > & value \u00A0!')).toBe( "<a &quot; attr > &amp; value &nbsp;!", )); it("should escape HTML text", () => expect(entities.escapeText('<a " text > & value \u00A0!')).toBe( '&lt;a " text &gt; &amp; value &nbsp;!', )); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JoaoPedroLanca/mcp-web-tools'

If you have feedback or need assistance with the MCP directory API, please join our Discord server