From 07b9d5aa45a51ce6d2372c46880cad2192da9d07 Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Sat, 13 Jun 2020 14:56:10 +0100 Subject: [PATCH] Ensure fragment for menu items is not itself rendered Formerly there was a "ghost" menu item with no text and no icon because Thymeleaf had not been instructed to remove the fragment definition. This change tidies that up and also removes the use of the "path" variable, which Thymeleaf populates from the current request context, and poses a potential security threat as a result (if users type malicious characters in the URL). --- .../resources/templates/fragments/layout.html | 136 ++++++++++-------- 1 file changed, 73 insertions(+), 63 deletions(-) diff --git a/src/main/resources/templates/fragments/layout.html b/src/main/resources/templates/fragments/layout.html index 7cb5f4697..f3b207483 100755 --- a/src/main/resources/templates/fragments/layout.html +++ b/src/main/resources/templates/fragments/layout.html @@ -1,88 +1,98 @@ - + - - - - + + + + - + - PetClinic :: a Spring Framework demonstration + PetClinic :: a Spring Framework demonstration - - + - +
-
- - +
-
-
-
-
-
- Sponsored by Pivotal
-
+ + +
+
+
+
+
+ Sponsored by Pivotal
+