HTML <iframe> code in custom module -> widget text field -> empty output


#1

I have a sudden problem in an existing custom module that normally worked just fine a few days ago.

So… In a custom module, I made a new field (left column -> add new field)) of type “text” with the name “video_embed_code”.
Then I output this as follows:

<div class="video-wrapper">
    <div class="video-content">
         <div class="media">
               {{ widget.video_embed_code }}
         </div>
          {% if widget.image.src %}<div class="image-overlay" style="background-image: url('{{ widget.image.src }}');"></div>{% endif %}
     </div>
  </div>

As default value i have a valid youtube video embedded

But when I view the block (which I included in a Landingpage) I get nothing as output , just empty space. What is going wrong here? Just a day ago this all worked fine. And now not anymore. I am not sure if it was me that changed something or Hubspot… (probably me :wink: )

40

EDIT: I guess I found a temporary solution: when I input escaped html for the same video everything works again…

So like this:

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/M7lc1UVf-VE&quot; frameborder=&quot;0&quot; allow=&quot;autoplay; encrypted-media&quot; allowfullscreen&gt;&lt;/iframe&gt;

I am very sure that it worked without escaping a couple of days ago. And now I assume Hubspot changed the validation of a text field… If so this will have consequences for all our Hubspot clients who think they can still input embed code in text fields… :confused:

Still awaiting answer from Hubspot.


#2

Today the problem exists only in previewing the template.
So it works again on previewing the real page based on that template. That is fine for me now. :wink: