# Does Find & Replace word in iFrames?

**URL:** https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022
**Category:** Support
**Tags:** watched-words
**Created:** [November 19, 2024, 3:40pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022 "2024-11-19T15:40:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [November 19, 2024, 3:40pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022/1 "2024-11-19T15:40:49Z")

</div>

**TLDR: is there a way to find and replace text within an iFrame?**

We are attempting to use Vidyard embeds in our site but their generated iframe embed text does not include https: in the URL:

 ![CleanShot 2024-11-19 at 10.36.19](https://global.discourse-cdn.com/meta/original/4X/7/1/d/71d9165aee6bf3bc98bac7466d9eb615e7100f46.png)

Simply updating `src="//play...` → `src="https://play...` fixes this. I brought it up to the Vidyard team that all other embed options have https except for the iFrame route. Until they fix it on their end, I’m trying to have it auto-correct in Discourse. My thought is to use #watched-words Replace with the above strings, but it doesn’t seem to be working. My guess is that Watched Words doesn’t look inside the code. Is that correct?

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [November 19, 2024, 3:55pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022/2 "2024-11-19T15:55:51Z")

</div>

Why do you want to replace these?

Using the double slash is a common and valid way of making sure that the embed uses the same secure/non-secure protocol as the embedding page. This avoids various warnings that the browser throws when mixing secure and non-secure content.

It’s called a protocol-relative URL: [https://en.wikipedia.org/wiki/URL#prurl](https://en.wikipedia.org/wiki/URL#prurl)

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [November 19, 2024, 3:57pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022/3 "2024-11-19T15:57:18Z")

</div>

> [@Bas](#):
>
> Why do you want to replace these?

Because the player fails to load without https

---

<div class="post-metadata">

### Author: ![Bas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bas/32/294929_2.png) [@Bas](https://meta.discourse.org/u/Bas)
#### Post date: [November 19, 2024, 4:05pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022/4 "2024-11-19T16:05:28Z")

</div>

Ah! So if I get this right:

You have whitelisted [https://play.vidyard.com/](https://play.vidyard.com/) in the `allowed iframes` settings. But because the embed code doesn’t specify the protocol.. the embeds don’t work?

If so, I think the best way forward would be for you to raise a support ticket with your Discourse-host (maybe that’s us), see if we can hardcode [//play.vidyard.com](https://play.vidyard.com) in the whitelist; bypassing the input check or something similarly creative.

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [November 19, 2024, 4:35pm UTC](https://meta.discourse.org/t/does-find-replace-word-in-iframes/337022/5 "2024-11-19T16:35:54Z")

</div>

You are correct—the existing whitelisted path is `https://play.vidyard.com/`. I just tried adding the non-https version, and it doesn’t look like the settings accepted it:

 ![CleanShot 2024-11-19 at 11.33.43](https://global.discourse-cdn.com/meta/original/4X/8/b/f/8bf2f96531606a8464520772631bccec624fa872.png)

I’ll open a support ticket 🙂 Thank you for your help @Bas!
