Jump to content

UBB Code Tag test


Recommended Posts

  • Root Admin

The following code was posted using the toolbar code tag

Function SelectFile( )
  Dim $objSHELLexec, $CMD, $objSHELL
  $SelectFile=""
  $CMD='mshta.exe "about:<input type=file id=FILE><script>FILE.click();new ActiveXObject("Scripting.FileSystemObject").GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(,);</script>" '
  $objSHELL=CreateObject("WScript.Shell")
  $objSHELLexec=$objSHELL.Exec($CMD)
  $SelectFile=$objSHELLexec.StdOut.ReadLine( )
EndFunction

 

The code above though is NOT 100% what came from the actual text editor. The ;resizeTo(,) is missing the values

resizeTo(0,0)

Is what it should have been.

 

 

Here is the same code just copy / pasted with no code tags.

 

Function SelectFile( )
  Dim $objSHELLexec, $CMD, $objSHELL
  $SelectFile=""
  $CMD='mshta.exe "about:<input type=file id=FILE><script>FILE.click();new ActiveXObject("Scripting.FileSystemObject").GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);</script>" '
  $objSHELL=CreateObject("WScript.Shell")
  $objSHELLexec=$objSHELL.Exec($CMD)
  $SelectFile=$objSHELLexec.StdOut.ReadLine( )
EndFunction

 

Here is the code using CODE tag manually without the toolbar.

 

Function SelectFile( )
	  Dim $objSHELLexec, $CMD, $objSHELL
	  $SelectFile=""
	  $CMD='mshta.exe "about:&lt;input type=file id=FILE&gt;&lt;script&gt;FILE.click();new ActiveXObject("Scripting.FileSystemObject").GetStandardStream(1).WriteLine(FILE.value);close();resizeTo(0,0);&lt;/script&gt;" '
	  $objSHELL=CreateObject("WScript.Shell")
	  $objSHELLexec=$objSHELL.Exec($CMD)
	  $SelectFile=$objSHELLexec.StdOut.ReadLine( )
	EndFunction

 

 

 

Link to post
Share on other sites

  • Root Admin

Fully understand that full UBB code is not supported however if the Toolbar can properly handle the above code then I would expect manually typing in the exact same tag would create the exact same result. It is close but not the same. It has changed and added different html escape characters that are not in the original code.

Part 1 - toolbar CODE tag should place 100% exactly what is written or pasted into a CODE box. It is very close 99% correct, but not 100%

Part 2 - manually using CODE tag should 100% duplicate what the Toolbar CODE tag does. About 80% correct

If you were writing or testing code and copied it the script would not work and the user would be left trying to figure out why it didn't work.

 

 

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.