* Replaces string tokens with {} placeholders for SafeHtml templating.
*
* @return the rendering string, with tokens replaced by {} placeholders
*/
private String addTemplatePlaceholders(String html) {
String rtn = Tokenator.detokenate(html, new Resolver() {
int tokenId = 0;
public String resolveToken(String token) {
return "{" + tokenId++ + "}";
}
});