I am trying to create new pages through javascript and assign some default
content. If there is a better way to do this, I'm all ears.
What I am trying (and failing) is this:
[new
page|javascript:location.href="http:Edit.jsp?page="+escape(prompt('New%20page%20name...'))+"&_editedtext=[{TableOfContents}]"]
This will prompt the user for a name, then redirect to the edit.jsp for that
page. I have found that including the "&_editedtext=someting" on the URL
will populate the text area. But in this case (because I am trying to
include a call to a plugin) the ']' on the plugin is being interpreted as
the closeing ']' on the link. Is there some way to encode or otherwise
escape the ']' in this case?
Disclaimer:
I know I am opening myself up by allowing the javascript: interwiki link,
but this is an internal wiki so it should be ok.
Thanks.
--
Bobman