diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/AbstractWidgetRenderer.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/AbstractWidgetRenderer.java index e7b5e626cb..65dd0695c3 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/AbstractWidgetRenderer.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/AbstractWidgetRenderer.java @@ -21,6 +21,7 @@ import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import org.apache.commons.lang3.StringEscapeUtils; import org.eclipse.jdt.annotation.NonNullByDefault; @@ -108,7 +109,7 @@ protected String preprocessSnippet(String originalSnippet, Widget w) { snippet = snippet.replace("%state%", escapeURL(state)); String category = getCategory(w); - snippet = snippet.replace("%category%", escapeURL(category)); + snippet = snippet.replace("%category%", Objects.requireNonNullElse(category, "")); return snippet; }