From 53f89ae595990c3344a0a9b18f22c65b49010ecb Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Wed, 15 May 2019 15:39:03 +0000 Subject: [PATCH] Improved: no functional change, only formatting While working on OFBIZ-5254 after reopening it. Uses the max width (120) makes things easier to read IMO git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859295 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/base/html/CustomPermissivePolicy.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/html/CustomPermissivePolicy.java b/framework/base/src/main/java/org/apache/ofbiz/base/html/CustomPermissivePolicy.java index 607cfddf9c..8501eeba01 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/html/CustomPermissivePolicy.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/html/CustomPermissivePolicy.java @@ -96,8 +96,7 @@ public class CustomPermissivePolicy implements SanitizerCustomPolicy { .allowAttributes("nohref").onElements("a") .allowAttributes("target").matching(NAME).onElements("a") .allowAttributes("name").matching(NAME).onElements("a") - .allowAttributes( - "onfocus", "onblur", "onclick", "onmousedown", "onmouseup") + .allowAttributes("onfocus", "onblur", "onclick", "onmousedown", "onmouseup") .matching(HISTORY_BACK).onElements("a") .requireRelNofollowOnLinks() .allowAttributes("src").matching(ONSITE_OR_OFFSITE_URL) @@ -130,17 +129,13 @@ public class CustomPermissivePolicy implements SanitizerCustomPolicy { .allowAttributes("height", "width").matching(NUMBER_OR_PERCENT) .onElements("table", "td", "th", "tr", "img") .allowAttributes("align").matching(ALIGN) - .onElements("thead", "tbody", "tfoot", "img", - "td", "th", "tr", "colgroup", "col") + .onElements("thead", "tbody", "tfoot", "img", "td", "th", "tr", "colgroup", "col") .allowAttributes("valign").matching(VALIGN) - .onElements("thead", "tbody", "tfoot", - "td", "th", "tr", "colgroup", "col") + .onElements("thead", "tbody", "tfoot", "td", "th", "tr", "colgroup", "col") .allowAttributes("charoff").matching(NUMBER_OR_PERCENT) - .onElements("td", "th", "tr", "colgroup", "col", - "thead", "tbody", "tfoot") + .onElements("td", "th", "tr", "colgroup", "col","thead", "tbody", "tfoot") .allowAttributes("char").matching(ONE_CHAR) - .onElements("td", "th", "tr", "colgroup", "col", - "thead", "tbody", "tfoot") + .onElements("td", "th", "tr", "colgroup", "col", "thead", "tbody", "tfoot") .allowAttributes("colspan", "rowspan").matching(NUMBER) .onElements("td", "th") .allowAttributes("span", "width").matching(NUMBER_OR_PERCENT)