From ba382f107cbe66794b8b7e8b7b0a036e57c41fce Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 19 Nov 2020 20:50:07 +0100 Subject: [PATCH] Fixed URL escape. --- src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java | 2 +- src/fr/devinsy/statoolinfos/htmlize/ServicePage.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java index 1b25bde..5196965 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServiceListView.java @@ -151,7 +151,7 @@ public class ServiceListView } if (StringUtils.isNotBlank(service.getSoftwareLicenseWebpage())) { - data.setAttribute("serviceListLine", index, "softwareLicenseLink", "href", service.getSoftwareLicenseWebpage()); + data.setAttribute("serviceListLine", index, "softwareLicenseLink", "href", XidynUtils.escapeXmlBlank(service.getSoftwareLicenseWebpage())); data.setAttribute("serviceListLine", index, "softwareLicenseLinkImg", "class", ""); data.getIdData("serviceListLine", index, "softwareLicenseLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); } diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java index 486a5bb..1598a80 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java @@ -40,6 +40,7 @@ import fr.devinsy.xidyn.XidynException; import fr.devinsy.xidyn.data.DisplayMode; import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.presenters.PresenterUtils; +import fr.devinsy.xidyn.utils.XidynUtils; /** * The Class ServicePage. @@ -192,7 +193,7 @@ public class ServicePage } if (StringUtils.isNotBlank(service.getSoftwareLicenseWebpage())) { - data.setAttribute("softwareLicenseLink", "href", service.getSoftwareLicenseWebpage()); + data.setAttribute("softwareLicenseLink", "href", XidynUtils.escapeXmlBlank(service.getSoftwareLicenseWebpage())); data.setAttribute("softwareLicenseLinkImg", "class", ""); data.getIdData("softwareLicenseLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE); }