Skip to content

Commit bd00405

Browse files
authored
Merge branch 'develop' into smart-list
2 parents f21ad1e + c572c6b commit bd00405

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/recorder/DOMBrowserRenderer.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,13 +879,13 @@ export const DOMBrowserRenderer: React.FC<RRWebDOMBrowserRendererProps> = ({
879879

880880
if (headTagRegex.test(rebuiltHTML)) {
881881
rebuiltHTML = rebuiltHTML.replace(
882-
headTagRegex,
883-
`<head>${cssInjection}`
882+
"<head>",
883+
`<head><base href="${snapshotData.baseUrl}">${minimalCSS}`
884884
);
885-
} else {
885+
} else if (rebuiltHTML.includes("<html>")) {
886886
rebuiltHTML = rebuiltHTML.replace(
887-
/<html[^>]*>/i,
888-
`<html><head>${cssInjection}</head>`
887+
"<html>",
888+
`<html><head><base href="${snapshotData.baseUrl}">${minimalCSS}</head>`
889889
);
890890
}
891891

0 commit comments

Comments
 (0)