Skip to content

Commit 06e8361

Browse files
committed
Fix Thymeleaf template issue when accessing static classes (disallowed in newer versions)
1 parent 6d17921 commit 06e8361

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/main/java/org/commonwl/view/workflow/WorkflowController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,9 @@ private ModelAndView getWorkflow(GitDetails gitDetails, RedirectAttributes redir
573573
}
574574
return new ModelAndView("loading", "queued", queued);
575575
} else {
576-
return new ModelAndView("workflow", "workflow", workflowModel).addObject("formats",
577-
WebConfig.Format.values());
576+
return new ModelAndView("workflow", "workflow", workflowModel)
577+
.addObject("lineSeparator", System.getProperty("line.separator"))
578+
.addObject("formats", WebConfig.Format.values());
578579
}
579580
}
580581

src/main/resources/templates/workflow.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ <h2>Inputs</h2>
258258
</td>
259259
<td class="title" th:text="${input.value.label}">Title</td>
260260
<td class="doc" >
261-
<p th:if="${input.value.doc != null}" th:utext="${#strings.replace( #strings.escapeXml(input.value.doc),T(java.lang.System).getProperty('line.separator')+T(java.lang.System).getProperty('line.separator'),'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
261+
<p th:if="${input.value.doc != null}" th:utext="${#strings.replace( #strings.escapeXml(input.value.doc),lineSeparator+lineSeparator,'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
262262
</td>
263263
</tr>
264264
</tbody>
@@ -293,7 +293,7 @@ <h2>Steps</h2>
293293
</td>
294294
<td class="title" th:text="${step.value.label}">Title</td>
295295
<td class="doc">
296-
<p th:if="${step.value.doc != null}" th:utext="${#strings.replace( #strings.escapeXml(step.value.doc),T(java.lang.System).getProperty('line.separator')+T(java.lang.System).getProperty('line.separator'),'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
296+
<p th:if="${step.value.doc != null}" th:utext="${#strings.replace( #strings.escapeXml(step.value.doc),lineSeparator+lineSeparator,'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
297297
</td>
298298
</tr>
299299
</tbody>
@@ -322,7 +322,7 @@ <h2>Outputs</h2>
322322
</td>
323323
<td class="title" th:text="${output.value.label}">Title</td>
324324
<td class="doc">
325-
<p th:if="${output.value.doc != null}" th:utext="${#strings.replace(#strings.escapeXml(output.value.doc),T(java.lang.System).getProperty('line.separator')+T(java.lang.System).getProperty('line.separator'),'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
325+
<p th:if="${output.value.doc != null}" th:utext="${#strings.replace(#strings.escapeXml(output.value.doc),lineSeparator+lineSeparator,'&lt;br /&gt;&lt;br /&gt;')}">Description might be a bit longer</p>
326326
</td>
327327
</tr>
328328
</tbody>

0 commit comments

Comments
 (0)