Jump to content

Content injected via script / iframe blocked.


JesseOntraport
Go to solution Solved by gonzo,

Recommended Posts

Hello!

At Ontraport we allow our customers to build and publish landing pages and forms via our editors. Forms from our system can be imbedded within published pages in a couple of different ways, via script tag or iframe. When the browser guard extension is installed it blocks this content. 

See this page for an example https://all3formtypes.respond.ontraport.net/

 

Here is what it looks like when the forms are not blocked

chrome_2021-01-26_08-57-53.thumb.png.0a27eed47c850ca20f1e2ad2543263b3.png

The extension is blocking the first 2 forms on the page.

 

Here is the console output.

chrome_2021-01-26_09-00-47.thumb.png.e8dd73c8df43b72c5e0a9291457da242.png

 

For forms published via iframes we use postMessage to send the form width and height to the parent window so the form content is not cut off. Here is that code

<div opt-id="3" class="opt-element opt-custom-html"><iframe style="display:block;position:relative;width:undefined;transition:opacity .25s ease-in-out, width 1s ease-in-out;margin:0;height:200px;opacity:0;" frameborder="0" scrolling="no" id="p2c206673f53" src="https://forms.ontraport.com/v2.4/include/formEditor/genlightbootstrap.php?uid=p2c206673f53&amp;formType=embed&amp;formGUID=OPF_bde3ace1-8356-5b19-352a-23730f1677f0&amp;referer=https%3A%2F%2Fall3formtypes.respond.ontraport.net%2F&amp;formceptionID=formception-033168ab-0408-0367-e338-723b9b481917&amp;__opv=v1&amp;lpid=611.0" class="OPF__embedded-form"></iframe>
  
  <script type="text/javascript" async="true" src="https://app.ontraport.com/js/ontraport/opt_assets/drivers/opf.js" data-opf-uid="p2c206673f53" data-opf-params="borderColor=#000000&amp;borderSize=0px&amp;embed=true&amp;formHeight=595&amp;formWidth=100%&amp;popPosition=mc&amp;instance=1545944488" data-_opf-register-guid="OPF_bde3ace1-8356-5b19-352a-23730f1677f0"></script></div>

 

Forms published via script tag look like this 

<script type="text/javascript" src="https://forms.ontraport.com/v2.4/include/formEditor/genbootstrap.php?method=script&amp;uid=p2c206673f68&amp;version=1"></script>

 

What if anything can we do in order to be in compliance with the browser guard extension?

 

Link to post
  • gonzo locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.