From 87e24b3840c75b5787ddbf0233dc292ee29227d2 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 8 Jun 2023 15:17:54 +0200 Subject: [PATCH] SEBSERV-444 fixed hopefully last time --- .../gui/content/monitoring/MonitoringRunningExam.java | 2 +- .../service/i18n/impl/PolyglotPageServiceImpl.java | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/MonitoringRunningExam.java b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/MonitoringRunningExam.java index ea3664ac..c33c5e50 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/MonitoringRunningExam.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/content/monitoring/MonitoringRunningExam.java @@ -154,7 +154,7 @@ public class MonitoringRunningExam implements TemplateComposer { pageContext.getParent(), new LocTextKey( "sebserver.monitoring.exam", - StringEscapeUtils.escapeHtml4(exam.name))); + StringEscapeUtils.escapeXml11(exam.name))); final Composite tablePane = new Composite(content, SWT.NONE); tablePane.setLayout(new GridLayout()); diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java index 1ddf4989..bc1beaf2 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/i18n/impl/PolyglotPageServiceImpl.java @@ -270,7 +270,16 @@ public final class PolyglotPageServiceImpl implements PolyglotPageService { return label -> { if (locTextKey != null) { - label.setText(i18nSupport.getText(locTextKey)); + try { + label.setText(i18nSupport.getText(locTextKey)); + } catch (final Exception e) { + label.setData(RWT.MARKUP_ENABLED, false); + try { + label.setText(i18nSupport.getText(locTextKey)); + } catch (final Exception ee) { + label.setText(locTextKey.name); + } + } } if (i18nSupport.hasText(locToolTipKey)) { label.setToolTipText(Utils.formatLineBreaks(i18nSupport.getText(locToolTipKey)));