From 2dfee13d86b4f984b8ba8bccf7017568fdc8cb3b Mon Sep 17 00:00:00 2001 From: CalDescent Date: Wed, 3 May 2023 19:44:54 +0100 Subject: [PATCH] Remove all backslashes from vars in HTML parser (correct order this time) --- src/main/java/org/qortal/api/HTMLParser.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/qortal/api/HTMLParser.java b/src/main/java/org/qortal/api/HTMLParser.java index 2bf8947d..cc3102e8 100644 --- a/src/main/java/org/qortal/api/HTMLParser.java +++ b/src/main/java/org/qortal/api/HTMLParser.java @@ -55,14 +55,14 @@ public class HTMLParser { } // Escape and add vars - String qdnContext = this.qdnContext != null ? this.qdnContext.replace("\"","\\\"") : ""; - String service = this.service.toString().replace("\"","\\\""); - String name = this.resourceId != null ? this.resourceId.replace("\"","\\\"") : ""; - String identifier = this.identifier != null ? this.identifier.replace("\"","\\\"") : ""; - String path = this.path != null ? this.path.replace("\"","\\\"") : ""; - String theme = this.theme != null ? this.theme.replace("\"","\\\"") : ""; - String qdnBase = this.qdnBase != null ? this.qdnBase.replace("\"","\\\"") : ""; - String qdnBaseWithPath = this.qdnBaseWithPath != null ? this.qdnBaseWithPath.replace("\"","\\\"") : ""; + String qdnContext = this.qdnContext != null ? this.qdnContext.replace("\\", "").replace("\"","\\\"") : ""; + String service = this.service.toString().replace("\\", "").replace("\"","\\\""); + String name = this.resourceId != null ? this.resourceId.replace("\\", "").replace("\"","\\\"") : ""; + String identifier = this.identifier != null ? this.identifier.replace("\\", "").replace("\"","\\\"") : ""; + String path = this.path != null ? this.path.replace("\\", "").replace("\"","\\\"") : ""; + String theme = this.theme != null ? this.theme.replace("\\", "").replace("\"","\\\"") : ""; + String qdnBase = this.qdnBase != null ? this.qdnBase.replace("\\", "").replace("\"","\\\"") : ""; + String qdnBaseWithPath = this.qdnBaseWithPath != null ? this.qdnBaseWithPath.replace("\\", "").replace("\"","\\\"") : ""; String qdnContextVar = String.format("", qdnContext, theme, service, name, identifier, path, qdnBase, qdnBaseWithPath); head.get(0).prepend(qdnContextVar);