HTML content is modified by Replit

Problem description

<base> tag is not working in Webview preview tab.

Expected behavior

<base> tag should work.

Actual behavior

<base> tag functionality seems to be removed.

Steps to reproduce

This replit is not working within the Webview, there’s a runtime error:

https://replit.com/@JoePea/Lume-Element-Names#index.html

Seems that replit does something with the <base> tag? If you pop it out into its own window, then it works:

58e1a937-9b17-4e41-a2cf-0c53df568dce-00-i1umprs7vx42.janeway.replit.dev/

Here’s the same demo on CodePen for reference, it is plain HTML:

Browser

all

OS

all

Device if mobile

all

Plan

Free

1 Like

Hi @JoePea , welcome to the forums!
Does this happen when opening the browser in a new tab?

Did you… Read their post?

3 Likes

@JoePea Thanks for sharing this issue. I’ll get it reported with the team.

3 Likes

Whoops, missed that. Only saw the first bit.

3 Likes

Bump! Looking for a solution to this bug.

Update: Solution, add: anywhere in your code.

<script>document.head.innerHTML = "<base href='/staff/'>" + document.head.innerHTML;</script>
1 Like