For a specific web application, I would like to implement a scripting language to assist in partially automating certain tasks. I cannot modify the web application itself, but I can send JavaScript code to each client that connects. Because multiple users of this publicly accessible site will be creating and posting scripts, I cannot use JavaScript itself for security reasons.
I would like some tips on whether such a scripting language implementation exists, or if not, tips on creating it. The focus should be on ease of text processing, Ajax requests, and implementation.
Edit: Some have questioned why I would want to do such a thing. The web application is a wiki, and I do not want to allow any administrative actions. Wikis allow other actions to be easily undone. I can't install anything such as Google Caja on the server.
Edit 2: Here is an example of what such a script would need to be able to do. This example is taken from Wikipedia's procedure for requesting article deletion.
- Ask the user for the name of a wiki page and a good reason to delete it.
- Get the source code of that page, prepend some text (a deletion notice) to it, then save it back.
- Create a new page (its name including that of the first page) with some text that includes the user's reason to delete the page.
- Get the list of users who edited the page and notify the first one (again, by editing a specific page) that the page he created is about to be deleted.
Edit 3: I have answered my own question, but not to my satisfaction. If anyone could suggest either
- A scripting language implementation I have overlooked; or
- Tips on designing a simple programming language and interpreter for the application I mention
I would appreciate it.