Skip to content

Feature request: configurable allowDangerousHtml / optional raw HTML rendering #18

Description

@devyao

Summary

StreamMarkdown passes allowDangerousHtml: false to remark-rehype, which strips raw HTML in Markdown. That option is not exposed as a component prop, so consumers cannot enable HTML rendering without patching the library.

Context / question

  1. Is disabling raw HTML intentional as the default security posture? (Understood if yes.)
  2. Would you consider exposing this (e.g. allowDangerousHtml?: boolean, default false) so trusted content can opt in?

Current behavior

In src/StreamMarkdown.ts, remarkRehype is used with a fixed option:

.use(remarkRehype, { allowDangerousHtml: false })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions