index.d.ts 365 B

12345678910111213
  1. /**
  2. * Encode only the dangerous HTML characters.
  3. *
  4. * This ensures that certain characters which have special meaning in HTML are
  5. * dealt with.
  6. * Technically, we can skip `>` and `"` in many cases, but CM includes them.
  7. *
  8. * @param {string} value
  9. * Value to encode.
  10. * @returns {string}
  11. * Encoded value.
  12. */
  13. export function encode(value: string): string