nl_tokens: String . prototype . replace () does something weird on strings with fancy regexps hence this artifical version
pl_tokens: function ( from , to , text , all ) { var pos = text . indexOf ( from ) ; if ( <mask> == - 1 ) { return text ; } text = text . substring ( 0 , pos ) + to + text . substring ( pos + from . length ) ; return ! all ? text : replace . call ( null , from , to , text , all ) ; }