export default function remarkHtml(options = {}) {
  const handlers = options.handlers || {}
  const schema =
    options.sanitize && typeof options.sanitize === 'object'
      ? options.sanitize
      : undefined

  Object.assign(this, {Compiler: compiler})

  /**
   * @type {import('unified').CompilerFunction<Root, string>}
   */
  function compiler(node, file) {
    const hast = toHast(node, {allowDangerousHtml: !options.sanitize, handlers})
    // @ts-expect-error: assume root.
    const cleanHast = options.sanitize ? sanitize(hast, schema) : hast
    const result = toHtml(
      // @ts-expect-error: assume root.
      cleanHast,
      Object.assign({}, options, {allowDangerousHtml: !options.sanitize})
    )

    if (file.extname) {
      file.extname = '.html'
    }

    // Add an eof eol.
    return node &&
      node.type &&
      node.type === 'root' &&
      result &&
      /[^\r\n]/.test(result.charAt(result.length - 1))
      ? result + '\n'
      : result
  }
}
The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.