How can I switch OFF html 'improvements'?

Permalink
I try to place html code of google advertising into Text Block.

But I can't save it correctly because concrete5 begin to change this code.

For example google gives the string:
script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"


And concrete5 changes it to
script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"


But I don't want it!
Is it way to switch this option OFF?
Or is it way to place necessary codes to Text Blocks without modifications?

 
mnakalay replied on at Permalink Reply
mnakalay
You should be placing that in an HTML block, not in a "text" block.

Also, you might be better off putting it in the header or footer using the tracking codes setting in Concrete5. You can find that in your site under dashboard/system/seo/codes
lekarstvame replied on at Permalink Reply
Yes, I know. In HTML blocks this code works good. And I use it there.

But also I'd like to use it in Text blocks too.

Is it possible to make additional file with this code and to use php include in Text blocks?
mnakalay replied on at Permalink Reply
mnakalay
I don't think it's possible without some serious hacking.

But I have to ask, why would you want it to be in a text block as opposed to an HTML block?

that line of code is designed to load the file adsbygoogle.js from its remote location. You only need to load it once per page. I don't see anything stopping you from just adding an HTML block to your page and you're done.

And if you need it on every page, then you should really use the tracking code functionality instead of manually adding it to your pages.

Am I missing something? Do you have a reason to want it in a text block?
lekarstvame replied on at Permalink Reply
I use advertising in HTML blocks in special stacks on the top and on the bottom of pages. And it works good.

But I'd like to place additional google banners right directly to the text of main content. And I'd like to use for content just one Text block. I don't wanna use First Text Block with first part of content, then below HTML block with adv. code and then below Second Text Block with second part of content.

But I can't. Concrete5 begin to erase some of google code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-5399602148320253"
     data-ad-slot="3231841129"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>


For example it destroys 'ins class=adsbygoogle' - I don't know why. :(
mnakalay replied on at Permalink Reply
mnakalay
I see.

Here are 2 tutorials that should help you modify the editor so it allows your ins tag:

https://legacy-documentation.concrete5.org/tutorials/extend-the-rich...
https://legacy-documentation.concrete5.org/tutorials/allow-html5-tag...