Skip to content

Commit af1c5c4

Browse files
committed
dont santise url as capi is a trusted source
1 parent 72a69d3 commit af1c5c4

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dotcom-rendering/src/components/VideoAtom.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { ArticleFormat } from '../lib/articleFormat';
2-
import { sanitiseHTML } from '../model/sanitise';
32
import { Caption } from './Caption';
43
import { MaintainAspectRatio } from './MaintainAspectRatio';
54

@@ -28,7 +27,6 @@ export const VideoAtom = ({
2827
width = 460,
2928
}: Props) => {
3029
if (assets.length === 0) return null; // Handle empty assets array
31-
const santisedUrl = sanitiseHTML(assets[0]?.url ?? '');
3230
return (
3331
<>
3432
<MaintainAspectRatio
@@ -47,13 +45,13 @@ export const VideoAtom = ({
4745
{assets.map((asset, index) => (
4846
<source
4947
key={index}
50-
src={santisedUrl}
48+
src={asset.url}
5149
type={asset.mimeType}
5250
/>
5351
))}
5452
<p>
5553
{`Your browser doesn't support HTML5 video. Here is a `}
56-
<a href={santisedUrl}>link to the video</a> instead.
54+
<a href={assets[0]?.url}>link to the video</a> instead.
5755
</p>
5856
</video>
5957
</MaintainAspectRatio>

0 commit comments

Comments
 (0)