diff --git a/CHANGELOG.md b/CHANGELOG.md index 74b73f54..cd3a701c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [MAJOR] Updated to Storybook 10 with CSF3 format and MDX documentation - [MINOR] Changed `ContainingView` to not make children automatically have `overflow: auto` - [MINOR] Added `maxWidth` prop to `ContainingView` +- [MINOR] Added `shouldEnableHtmlParsing` to `Markdown` ### Removed diff --git a/src/molecules/markdown/component.tsx b/src/molecules/markdown/component.tsx index d45d8252..ec8420c7 100644 --- a/src/molecules/markdown/component.tsx +++ b/src/molecules/markdown/component.tsx @@ -98,6 +98,7 @@ export interface IMarkdownProps { extraOverrideComponents?: Record; shouldForceWrapper?: boolean; shouldForceBlock?: boolean; + shouldEnableHtmlParsing?: boolean; } export const Markdown = React.memo((props: IMarkdownProps): React.ReactElement => { @@ -112,6 +113,7 @@ export const Markdown = React.memo((props: IMarkdownProps): React.ReactElement = options={{ forceWrapper: props.shouldForceWrapper, forceBlock: props.shouldForceBlock ?? true, + disableParsingRawHTML: !props.shouldEnableHtmlParsing, wrapper: 'span', overrides: { a: { component: MarkdownLink }, diff --git a/src/molecules/markdownText/component.tsx b/src/molecules/markdownText/component.tsx index fa56796b..fd60fe1c 100644 --- a/src/molecules/markdownText/component.tsx +++ b/src/molecules/markdownText/component.tsx @@ -41,6 +41,7 @@ export const MarkdownText = React.memo((props: IMarkdownTextProps): React.ReactE