format string in widgets.js