By Martin Mubiru on Saturday, 28 October 2017
Posted in General
Replies 3
Likes 0
Views 1.9K
Votes 0
Hello,

When I insert an HTML block in posts with the adsense code, it works and displays well before saving draft or publishing. When I save, it displays blank.

The code changes as if it is stripped and added more codes. See below how it changes:

Original code:
[gist type="php"]
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-5839100731048282"
data-ad-slot="9090381681"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
[/gist]


Code after publishing
[gist type="php"]
<script async="" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle" style="display: block; text-align: center; height: 185px;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-5839100731048282" data-ad-slot="9090381681" data-adsbygoogle-status="done"><ins id="aswift_0_expand" style="display:inline-table;border:none;height:185px;margin:0;padding:0;position:relative;visibility:visible;width:737px;background-color:transparent;"><ins id="aswift_0_anchor" style="display:block;border:none;height:185px;margin:0;padding:0;position:relative;visibility:visible;width:737px;background-color:transparent;"><iframe marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;width:737px;height:185px;" width="737" height="185" frameborder="0"></iframe></ins></ins></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

[/gist]
What is the cause?
Hey Martin,

I am really sorry for the delay of this reply as it is a weekend for us here. Hm, it looks like the problem is because when you pasted the html codes, Google has already ran the codes and it already updated the HTML that is generated on the page.

Hence when you try to edit it, it breaks. I have logged this into our issue tracker and we'll see if we are able to come up with a better way of populating these data.
·
Sunday, 29 October 2017 15:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Please let me when you come up with anything. This is important.
·
Tuesday, 31 October 2017 03:50
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

We going to release our Easyblog tomorrow. This fixes will be included on this release version. Thanks for your understanding.
·
Tuesday, 31 October 2017 12:08
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post