diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/history/HistoryPanel.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/history/HistoryPanel.java index 0b42a88..b6ace8a 100644 --- a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/history/HistoryPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/history/HistoryPanel.java @@ -30,6 +30,7 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.Scheduler; import com.google.gwt.core.client.Scheduler.ScheduledCommand; import com.google.gwt.safehtml.shared.SafeHtmlBuilder; +import com.google.gwt.safehtml.shared.SafeHtmlUtils; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.web.bindery.event.shared.EventBus; import com.sencha.gxt.core.client.IdentityValueProvider; @@ -115,10 +116,11 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener { @Override public void render(Context context, OpHistory value, SafeHtmlBuilder sb) { - sb.appendHtmlConstant("

Date:").appendEscaped( - value.getDate()).appendHtmlConstant("

"); - sb.appendHtmlConstant("

Description:") - .appendEscaped(value.getDescription()).appendHtmlConstant("

"); + sb.appendHtmlConstant("

Date:" + + value.getDate() + "

"); + sb.appendHtmlConstant("

Description:" + + SafeHtmlUtils.htmlEscape(value + .getDescription()) + "

"); } }); @@ -129,8 +131,9 @@ public class HistoryPanel extends FramedPanel implements MonitorDialogListener { @Override public void render(Context context, String value, SafeHtmlBuilder sb) { - sb.appendHtmlConstant("").appendEscaped(value). - appendHtmlConstant(""); + sb.appendHtmlConstant("" + + SafeHtmlUtils.htmlEscape(value) + ""); } diff --git a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java index 3a17da4..7ab57b9 100644 --- a/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java +++ b/src/main/java/org/gcube/portlets/user/td/tablewidget/client/validation/ValidationsTasksPanel.java @@ -666,70 +666,6 @@ public class ValidationsTasksPanel extends FramedPanel implements } - // @SuppressWarnings("rawtypes") - // protected AbstractCell actionButton = new AbstractCell() { - // - // @Override - // public void render(Context context, Boolean value, SafeHtmlBuilder sb) { - // - // if (value == null) { - // sb.appendHtmlConstant(""); - // } else { - // Log.debug("Context: pos=" + context.getIndex() + ", key=" - // + context.getKey() + ", column=" + context.getColumn()); - // String key = (String) context.getKey(); - // BaseDto d = store.findModelWithKey(key); - // - // /* - // * List list = ; - // * Log.debug("List: ["+list.toString()+"]"); int i = 0; BaseDto - // * d=null; for (; i < list.size(); i++) { BaseDto dt = - // * list.get(i); if (dt.getId().compareTo((String) - // * context.getKey()) == 0) { d=dt; - // * Log.debug("Retrieved: "+d+" at pos:"+i); break; } } - // */ - // - // String title = ""; - // if (d != null) { - // Log.debug(d.toString()); - // if (d instanceof ValidationDto) { - // ValidationDto v = (ValidationDto) d; - // Log.debug("ValidationDto: [" + v.getId() + ", " - // + v.getDescription() + ", " + v.getValid() - // + ", " + v.getInvocation() + "]"); - // if (v.getInvocation() != null) { - // title = v.getInvocation().toString(); - // } - // } - // } - // - // if (value) { - // - // sb.appendHtmlConstant("true"); - // - // } else { - // sb.appendHtmlConstant("false"); - // - // } - // } - // - // } - // }; - - /* - * validationButton.addSelectHandler(new SelectHandler() { - * - * @Override public void onSelect(SelectEvent event) { - * Log.debug("Button ValidationCell Pressed"); Context context = - * event.getContext(); requestSolution(context); - * - * } }); - */ + }