File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
dotcom-rendering/src/components Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ export const HorizontalSummaryProductCard = ({
8383} ) => {
8484 const cardCta = product . productCtas [ 0 ] ;
8585 if ( ! cardCta ) return null ;
86+ const primaryHeadingWithoutEmTags = product . primaryHeadingHtml . replace (
87+ / < \/ ? e m > / g,
88+ '' ,
89+ ) ;
90+ const primaryHeadingWithoutColon = primaryHeadingWithoutEmTags . replace (
91+ / : $ / g,
92+ '' ,
93+ ) ;
8694
8795 return (
8896 < div css = { horizontalCard } >
@@ -94,12 +102,7 @@ export const HorizontalSummaryProductCard = ({
94102 />
95103 </ div >
96104 < div css = { informationContainer } >
97- < div
98- css = { productCardHeading }
99- dangerouslySetInnerHTML = { {
100- __html : product . primaryHeadingHtml ,
101- } }
102- > </ div >
105+ < div css = { productCardHeading } > { primaryHeadingWithoutColon } </ div >
103106 < div css = { secondaryHeading } > { product . secondaryHeadingHtml } </ div >
104107 < a href = { `#${ product . h2Id } ` } css = { readMore } >
105108 Read more
You can’t perform that action at this time.
0 commit comments