Skip to content

Commit

Permalink
Use https for videos hosted on cdn.theguardian.tv (#11690)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielCliftonGuardian committed Jun 20, 2024
1 parent bd53e75 commit 9a00774
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dotcom-rendering/src/components/GuVideoBlockComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ export const GuVideoBlockComponent = ({
width: 100%;
}
`;

const httpsHtml = html.replaceAll(
new RegExp('http://cdn\\.theguardian\\.tv', 'g'),
'https://cdn.theguardian.tv',
);
const sanitizedHtml = unescapeData(httpsHtml);
return (
<div css={embedContainer}>
<div dangerouslySetInnerHTML={{ __html: unescapeData(html) }} />
<div dangerouslySetInnerHTML={{ __html: sanitizedHtml }} />

{!!caption && (
<Caption
Expand Down

0 comments on commit 9a00774

Please sign in to comment.