You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2020/07/16 07:44:22 UTC
[myfaces-tobago] branch master updated: TOBAGO-1843: Demo * Show
Sanitizer Info
This is an automated email from the ASF dual-hosted git repository.
lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git
The following commit(s) were added to refs/heads/master by this push:
new 4d32e20 TOBAGO-1843: Demo * Show Sanitizer Info
4d32e20 is described below
commit 4d32e20c0c0ac2d40f2bdfaa9c16ffb0346ebb15
Author: Udo Schnurpfeil <ud...@irian.eu>
AuthorDate: Thu Jul 16 09:43:32 2020 +0200
TOBAGO-1843: Demo
* Show Sanitizer Info
---
.../src/main/java/org/apache/myfaces/tobago/sanitizer/Sanitizer.java | 4 ++++
tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml | 1 +
2 files changed, 5 insertions(+)
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/sanitizer/Sanitizer.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/sanitizer/Sanitizer.java
index 14bc019..efa3242 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/sanitizer/Sanitizer.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/sanitizer/Sanitizer.java
@@ -26,4 +26,8 @@ public interface Sanitizer {
String sanitize(String html);
void setProperties(Properties configuration);
+
+ default String getInfo() {
+ return toString();
+ };
}
diff --git a/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml b/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
index 20be51e..b3edd7c 100644
--- a/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
+++ b/tobago-example/tobago-example-demo/src/main/webapp/server-info.xhtml
@@ -53,6 +53,7 @@
<tc:out label="Project Stage:" value="#{facesContext.application.projectStage}"/>
<tc:out label="CSP mode:" value="#{tobagoContext.tobagoConfig.contentSecurityPolicy.mode}"/>
<tc:out label="CSP detail:" value="#{tobagoContext.tobagoConfig.contentSecurityPolicy.directiveMap}"/>
+ <tc:out label="Sanitizer:" value="#{tobagoContext.tobagoConfig.sanitizer}"/>
<tc:segmentLayout medium="6seg 6seg" large="4seg 4seg 4seg" extraLarge="3 seg 3seg 3seg">
<tc:selectBooleanCheckbox value="#{version.version20}" readonly="true" label="Version 2.0"/>