diff --git a/banking/src/components/ui/error-banner.tsx b/banking/src/components/ui/error-banner.tsx
index 0c57642503a..ee5cbd7e5e5 100644
--- a/banking/src/components/ui/error-banner.tsx
+++ b/banking/src/components/ui/error-banner.tsx
@@ -22,18 +22,6 @@ const parseHeading = (message?: ParsedErrorMessage) => {
return message?.title
}
-const wrapLooseListItemsWithUl = (html: string): string => {
- // Regex matches consecutive
... blocks not wrapped in or
- // It wraps them in a if not already wrapped.
- return html.replace(/(?:^|[^>])((- )+)(?![\s\S]*?<\/ul>)(?![\s\S]*?<\/ol>)/g, (match, p1) => {
- // Check if the match already has
or wrapping (simple check)
- if (/^/.test(p1) || /^/.test(p1)) {
- return match // Already wrapped, keep as is
- }
- return match.replace(p1, ``)
- })
-}
-
const ErrorBanner = ({ error, overrideHeading, ...props }: ErrorBannerProps) => {
@@ -53,8 +41,7 @@ const ErrorBanner = ({ error, overrideHeading, ...props }: ErrorBannerProps) =>
{overrideHeading ?? parseHeading(messages[0])}
{messages.map((m, i) => {
- const safeMessage = wrapLooseListItemsWithUl(m.message)
- return
+ return
})}