In my test, the code didn’t do anything. So it’s hard to evaluate. What exactly could the code do? Unless it could write to the file system (which is really hard in JS), or if it could send the keystrokes back to a server-based entity, it would not be able to accomplish anything. What browser are you testing with?
I think the WP article is talking about abilities that existed before modern browsers. Modern browsers, as we have found out to our chagrin, tell you that they are doing a download. They can only download to one place, which is usually the download directory. They know nothing about the file system, and can’t even tell you the path of an image that has been loaded (also to our chagrin). Once a file is downloaded, it can only be executed by a deliberate action. On Linux, most file managers won’t execute from the GUI anymore, so no accidental clicking. On Windows, Windows pops up a message warning you that you are about to run a potentially dangerous file. So it’s not easy to get your code executed even if it is downloaded.
If a person deliberately puts code on their page that does malicious things, it doesn’t matter how it is inserted.
So basically, you’re just saying that TW uses Javascript and somebody could insert additional JS. But that is a weakness/strength of all AJAX pages. It’s not like I could go to an existing TW site and add my own malicious code. It would have to be running a special server based version of TW (node, Bob, ) to make that possible – not the standalone.
In terms of self-protection, the best away to avoid malicious code would be to only use code/plugins that are WikiText based (after reviewing that it doesn’t create JS tiddlers), or only using plugins from sources that you really, really trust (e.g. Eric S.)