Good morning everyone,
I would like to introduce a Google ad in the middle of a story, but the code is not correct. I do not know if I can put the code directly so I'm not going to put the script, it has the typical structure of Google ads.
I edit to add the code:
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- anuncios -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-97601142716609XX"
data-ad-slot="62861274XX"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
The fact is that for whatever reason the code in the text is shown like this:
For the creator of new articles, which is a tool that I have created myself, I do not go through any filter of strip_tags()
or htmlspecialchars()
, since I am the only one that publishes articles. Therefore, I do not understand why he is doing that to me.
The information of the text I collect it in the following way:
$articulo = $_POST['articulo'];
$articulo = a_html($articulo);
$articulo = para_vista_previa($articulo);
Where the two functions is just to translate some tags that I have added to the text editor and translate it to html code.
What can it be due to?