TinyPortal

Development => Support => Topic started by: WillyP on August 06, 2011, 05:13:55 PM

Title: Missing script and added code when saving javascript/ html block.
Post by: WillyP on August 06, 2011, 05:13:55 PM
Link to my site:http://planetdescent.net
SMF version: SMF 1.1.14
TP version: TP 1.0 beta 3
Theme name and version: Based on Dusky by Crip
Browser Name and Version: Firefox 5
Mods installed:


Related Error messages: None

I had some script in a block, and I opened the block to remove the header and title. When I saved, it no longer worked. I opened it again, looked at the script, and part of the script was missing, and
 was added at the top. So I removed the
, added the script back and saved. I opened it again, and again the same part of the script was missing! And this was added at the top:
<br _moz_editor_bogus_node="TRUE" />

What do you think... I been hacked?

Here is the code before I save:
<script language="javascript">
nd_mode="bomb";
nd_dest="massive";
nd_sound="on";
nd_vAlign="bottom";
nd_hAlign="right";
nd_vMargin="10";
nd_hMargin="10";
nd_target="_top";
</script>

<script language="javascript" src="http://www.netdisaster.com/js/mynd.js"></script>


And after I save:
<br _moz_editor_bogus_node="TRUE" />

<script language="javascript">
nd_mode="bomb";
nd_dest="massive";
nd_sound="on";
nd_vAlign="bottom";
nd_hAlign="right";
nd_vMargin="10";
nd_hMargin="10";
nd_target="_top";
</script>


It was working fine before I decided to remove the header and title.
Title: Re: Missing script and added code when saving javascript/ html block.
Post by: WillyP on August 06, 2011, 05:29:55 PM
Strange, if I copy it into a bbc/ html block, save that, then change it to a html/ javascript block it is fine... I can open the block and view the script, but if Isave it then it changes the script.
Title: Re: Missing script and added code when saving javascript/ html block.
Post by: lurkalot on August 07, 2011, 09:50:23 AM
WP, your code works fine for me on my testsite.  http://cctestsite.info/forums/index.php

I don't use the wysiwyg editor in those blocks usually, but turning it on everything still works as expected.  I'm still using the RC2 with fixes from the team board, http://www.tinyportal.net/index.php?topic=34248.0  and not the one from the beta testing board. ;)

What happens if you turn the editor off?
Title: Re: Missing script and added code when saving javascript/ html block.
Post by: WillyP on August 07, 2011, 02:53:49 PM
I have looked all over and don't see an option to disable the WYSIWYG editor.

Anyway,  I'll upgrade the site to smf2 and the latest TP soon, so no matter. I was worried about this: "<br _moz_editor_bogus_node="TRUE" />" might might mean I been hacked, but then I googled it and it turns out to be Mozilla internal code for
 . Weird that it turns up in a code block, but when I can I'll test on my test site.

So, I guess I will mark this solved for now and when I upgrade I will test to make sure it does not return.
Title: Re: Missing script and added code when saving javascript/ html block.
Post by: lurkalot on August 07, 2011, 05:03:14 PM
Quote from: WillyP on August 07, 2011, 02:53:49 PM
I have looked all over and don't see an option to disable the WYSIWYG editor.


TP admin / articles / settings.  You'll see the on / off for the editor.  It will turn it off for blocks too.  ;)

Glad it was nothing nasty.  O0

Title: Re: Missing script and added code when saving javascript/ html block.
Post by: amanda87 on November 26, 2011, 12:03:11 PM
Quote from: lurkalot on August 07, 2011, 05:03:14 PM
Quote from: WillyP on August 07, 2011, 02:53:49 PM
I have looked all over and don't see an option to disable the WYSIWYG editor.


TP admin / articles / settings.  You'll see the on / off for the editor.  It will turn it off for blocks too.  ;)

Glad it was nothing nasty.  O0

I was looking for this all over the internet! Thank you.