TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,910
  • Total Topics: 21,307
  • Online today: 872
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 218
  • Total: 219
  • @rjen

HTML CODE gives extra strings, after saving ...

Started by ClickSafe, January 30, 2012, 02:57:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ClickSafe

When i add the Google Ads code to Tiny Portal (html code), it saves in a strange way:
I ADD:
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
/* forumonder */
google_ad_slot = "3643026077";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></center>


When i look to the code again i see next:
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-XXXXXXXXXXXXXXXX";
/* forumonder */
google_ad_slot = "3643026077";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<ins style="display:inline-table;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px">
<ins id="aswift_0_anchor" style="display:block;border:none;height:90px;margin:0;padding:0;position:relative;visibility:visible;width:728px"><iframe allowtransparency="true" frameborder="0" height="90" hspace="0" marginwidth="0" marginheight="0" onload="var i="this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){i+='.call';setTimeout(h,0)}else" if(h.match){i+='.nav';w.location.replace(h)}s.log&amp;&amp;s.log.push(i)}" scrolling="no" vspace="0" width="728" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins></center>

I use last release from SMF and Tiny Portal
Thanks in advance  ;)

Lesmond

What sort of block did you use? it should be an html/script block without using the WYSIWYG editor.

Please read the Posting Guidelines

ClickSafe

Thank you for your quick response  ;)
I have used the correct block and used the HTML button to enter HTML code.
Here another 2 situations, 1 correct and 1 with the same result ...
CORRECT saving:
<center><span style="font-size: x-small">Volg het <strong>meeste recente medisch nieuws</strong> op onze scoop.it </span><span style="font-size: xx-small">(klik op een item, scroller blijft bij een mouse-over gewoon staan)<br />
</span><iframe height="200" src="http://www.scoop.it/t/gezondheid-chronische-pijn/js?format=rect&amp;;numberOfPosts=10&amp;;title=Gezondheid%20%26%20Chronische%20pijn&amp;;speed=5&amp;;mode=normal&amp;;width=345" frameborder="0" width="345" scrolling="no" align="middle"></iframe></center>


INCORRECT SAVING:
<center><embed width="130" height="130" src="/relog.swf?ggh=&amp;gid=&amp;&amp;ggm=&amp;rnd=&amp;gha=&amp;fna=&amp;ghb=&amp;ghf=&amp;gbc=&amp;gfc=&gt;c=&amp;gnu=" allowscriptaccess="always" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></object></center>

SAVED AS:
<center>
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="130" height="130">
<param name="_cx" value="3439">
<param name="_cy" value="3439">
<param name="FlashVars" value="">
<param name="Movie" value="/relog.swf?ggh=&amp;gid=&amp;&amp;ggm=&amp;rnd=&amp;gha=&amp;fna=&amp;ghb=&amp;ghf=&amp;gbc=&amp;gfc=&amp;gtc=&amp;gnu=">
<param name="Src" value="/relog.swf?ggh=&amp;gid=&amp;&amp;ggm=&amp;rnd=&amp;gha=&amp;fna=&amp;ghb=&amp;ghf=&amp;gbc=&amp;gfc=&amp;gtc=&amp;gnu=">
<param name="WMode" value="Transparent">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value="">
<param name="Menu" value="-1">
<param name="Base" value="">
<param name="AllowScriptAccess" value="always">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value="">
<param name="SWRemote" value="">
<param name="MovieData" value="">
<param name="SeamlessTabbing" value="1">
<param name="Profile" value="0">
<param name="ProfileAddress" value="">
<param name="ProfilePort" value="0">
<param name="AllowNetworking" value="all">
<param name="AllowFullScreen" value="false">
   
<embed width="130" height="130" src="/relog.swf?ggh=&amp;gid=&amp;&amp;ggm=&amp;rnd=&amp;gha=&amp;fna=&amp;ghb=&amp;ghf=&amp;gbc=&amp;gfc=&gt;c=&amp;gnu=" allowscriptaccess="always" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></object></center>


AND ANOTHER CORRECT SAVING:
<iframe height="250" src="http://www.scoop.it/t/gezondheid-chronische-pijn/js?format=square&amp;numberOfPosts=10&amp;title=Gezondheid%20%26%20Chronische%20pijn&amp;speed=3&amp;mode=normal&amp;width=155" frameborder="0" width="155" scrolling="no" align="middle"></iframe>

Seems to be very strange that some code is stored 100% and other code is saved with extra text ...
However the block are working, but still it's something whats going wrong ...

ClickSafe

Sorry to reply so soon, but i just find out that the Google Ads code goes wrong on different sites/servers.
I have 2 different accounts by 2 different hosting company's and if i enter the Google ads code, it goes by both wrong.
THIS line is causes the problem:
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

And if i analyse it, it's because there is no > after: <script type="text/javascript"
If i put there an > then it saves like i typed it ... (but then the code does not work  :-X , whats normal)

ClickSafe

I have changed languages to standard non UTF8, but no result, this error remains...
Even standard English does not change anything.
I suppose its some minor issue in Tiny Portal, by saving HTML and using < or >.
Strange thing is using next code = OK:
<div style="color:red;" align="center">abc</div>
And this code not:
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

;)
I found where the problem is, but do not know how to solve it:
THIS works OK: (the file showads.js is NOT real)
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/showads.js">
</script>

THIS NOT: the file show_ads.js is REAL and will be executed
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


And i supose that this is the code from: show_ads.js, that's WHY it's added
<iframe allowtransparency="true" frameborder="0" height="90" hspace="0" marginwidth="0" marginheight="0" onload="var i="this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){i+='.call';setTimeout(h,0)}else" if(h.match){i+='.nav';w.location.replace(h)}s.log&amp;&amp;s.log.push(i)}" scrolling="no" vspace="0" width="728" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe>
It's executing the code and save the code while you save the HTML in Tiny Portal

IchBin

Thx for reporting! Don't have a lot of time right now to look into the problem. But I suspect you are right, that the code is running through eval() or something and getting parsed when saved or something to that efffect. If someone has a second, please put something in the bugtracker for this.

G6Cad

I would have helped you with thaat. but it seems it's off limits to me like most other things i used to have access to hahahaha
No worries through, quite like it this way with no "obligation"  to the "must help where i can"  :2funny:

ClickSafe

Quote from: IchBinâ,,¢ on January 31, 2012, 03:18:27 PM
Thx for reporting! Don't have a lot of time right now to look into the problem. But I suspect you are right, that the code is running through eval() or something and getting parsed when saved or something to that efffect. If someone has a second, please put something in the bugtracker for this.
Hello IchBin,
I have still this error on a brand new install of SMF and TP.
If you like ... i can give you access to one of my domains, so you can check why this is happens by some hosting company's.
I do not have any other problem with mods/ SMF/ themes or other related things.
Thank you in advance  ;)

IchBin

Not sure I'll be able to do anything. This appears to be a problem with the editor itself from what I can see at the moment. I'm no javascript guru, so this may not get fixed if I don't see the problem. :(

ClickSafe

Thanks for your rely IchBin ;)

If its a JavaScript error like you mentioned, it's possible that i will find and correct this issue.
I let you know one off these days the result  ::)

This website is proudly hosted on Crocweb Cloud Website Hosting.