We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f21ad1e + c572c6b commit bd00405Copy full SHA for bd00405
src/components/recorder/DOMBrowserRenderer.tsx
@@ -879,13 +879,13 @@ export const DOMBrowserRenderer: React.FC<RRWebDOMBrowserRendererProps> = ({
879
880
if (headTagRegex.test(rebuiltHTML)) {
881
rebuiltHTML = rebuiltHTML.replace(
882
- headTagRegex,
883
- `<head>${cssInjection}`
+ "<head>",
+ `<head><base href="${snapshotData.baseUrl}">${minimalCSS}`
884
);
885
- } else {
+ } else if (rebuiltHTML.includes("<html>")) {
886
887
- /<html[^>]*>/i,
888
- `<html><head>${cssInjection}</head>`
+ "<html>",
+ `<html><head><base href="${snapshotData.baseUrl}">${minimalCSS}</head>`
889
890
}
891
0 commit comments