Improving blosxom's bookmarklet for wikieditish

Tatsuhiko Miyagawa’s bookmarklet is a plugin for use with another Blosxom plugin, wikieditish. I’m relying heavily on the tiny bit of javascript provided by the bookmarklet on my linkblog, and came up with a small improvement.

The script already (at v.0.03) picks up any selection made by the user, and uses that for a title.
0){void(window.open(‘$blosxom::url’+path+’.wikieditish?bookmarklet=1&title=’+escape(d.title)+’&url=’+escape(d.location.href)+’&quote=’+escape(t),’_blank’,”))};”>My version uses the same data to fill in the prompt for entry path with a reasonable default; it is converted to lowercase and then all the whitespaces are replaced with dashes. The resulting path resembles that of WordPress’ so-called Pretty permalinks.