nl_tokens: Escapes any characters that are illegal in a CouchDB database name using percent codes inside parenthesis Example : My . name
pl_tokens: function getLegalDBName ( input ) { input = input . toLowerCase ( ) ; var output = encodeURIComponent ( input ) ; output = output . replace ( / \. / g , '%2E' ) ; output = output . replace ( / ! / g , '%21' ) ; output = output . replace ( / ~ / g , '%7E' ) ; output = output . replace ( / \* / g , '%2A' ) ; output = output . replace ( / ' / g , '%27' ) ; output = output . replace ( / \( / g , '%28' ) ; output = output . replace ( / \) / g , '%29' ) ; output = output . replace ( / \- / g , '%2D' ) ; output = output . toLowerCase ( ) ; output = <mask> . replace ( / (%..) / g , function ( esc ) { esc = esc . substr ( 1 ) ; return '(' + esc + ')' ; } ) ; return output ; }