if(editor.equalsIgnoreCase("rtf") || editor.equalsIgnoreCase("textblock")){
// Add unencoded version to suffix. Will be used by RTF editor for updates
suffix.append("<span class=\"WGA-Item-Value-Unencoded\" id=\"item_"+itemName+"_unencoded\" style=\"display:none\" >");
if (result.size() >= 1) {
RTFEncodingFormatter formatter = new RTFEncodingFormatter(true);
formatter.setContext(getTMLContext());
try {
suffix.append(formatter.format(result.get(0)));
}
catch (FormattingException e) {
addWarning(e.getMessage());
suffix.append(String.valueOf(result.get(0)));
}