From fcca81783e53431eecdc7b54eaa1deed3c0b024e Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Tue, 28 Mar 2017 20:16:26 +0000 Subject: [PATCH] - escape image alt attribute as it's breaking xml format in some metadata.xml --- .../org/bigbluebutton/api/util/ResponseBuilder.java | 12 ++++++------ .../{get-meeting-info.ftl => get-meeting-info.ftlx} | 0 .../{get-recordings.ftl => get-recordings.ftlx} | 2 +- ...{include-recording.ftl => include-recording.ftlx} | 0 .../{get-meeting-info.ftl => get-meeting-info.ftlx} | 0 .../{get-meetings.ftl => get-meetings.ftlx} | 0 .../{get-recordings.ftl => get-recordings.ftlx} | 2 +- ...{include-recording.ftl => include-recording.ftlx} | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) rename bbb-common-web/src/test/resources/{get-meeting-info.ftl => get-meeting-info.ftlx} (100%) rename bbb-common-web/src/test/resources/{get-recordings.ftl => get-recordings.ftlx} (90%) rename bbb-common-web/src/test/resources/{include-recording.ftl => include-recording.ftlx} (100%) rename bigbluebutton-web/web-app/WEB-INF/freemarker/{get-meeting-info.ftl => get-meeting-info.ftlx} (100%) rename bigbluebutton-web/web-app/WEB-INF/freemarker/{get-meetings.ftl => get-meetings.ftlx} (100%) rename bigbluebutton-web/web-app/WEB-INF/freemarker/{get-recordings.ftl => get-recordings.ftlx} (90%) rename bigbluebutton-web/web-app/WEB-INF/freemarker/{include-recording.ftl => include-recording.ftlx} (95%) diff --git a/bbb-common-web/src/main/java/org/bigbluebutton/api/util/ResponseBuilder.java b/bbb-common-web/src/main/java/org/bigbluebutton/api/util/ResponseBuilder.java index aadfa189a4..9e74c3e8a5 100755 --- a/bbb-common-web/src/main/java/org/bigbluebutton/api/util/ResponseBuilder.java +++ b/bbb-common-web/src/main/java/org/bigbluebutton/api/util/ResponseBuilder.java @@ -39,7 +39,7 @@ public class ResponseBuilder { Template ftl = null; try { - ftl = cfg.getTemplate("get-meeting-info.ftl"); + ftl = cfg.getTemplate("get-meeting-info.ftlx"); } catch (IOException e) { log.error("Cannot find get-meeting-info.ftl template for meeting : " + meeting.getInternalId(), e); } @@ -74,9 +74,9 @@ public class ResponseBuilder { Template ftl = null; try { - ftl = cfg.getTemplate("get-meetings.ftl"); + ftl = cfg.getTemplate("get-meetings.ftlx"); } catch (IOException e) { - log.error("IO exception for get-meetings.ftl : ", e); + log.error("IO exception for get-meetings.ftlx : ", e); } StringWriter xmlText = new StringWriter(); @@ -90,7 +90,7 @@ public class ResponseBuilder { } catch (TemplateException e) { log.error("Template exception : ", e); } catch (IOException e) { - log.error("IO exception for get-meetings.ftl : ", e); + log.error("IO exception for get-meetings.ftlx : ", e); } return xmlText.toString(); @@ -100,7 +100,7 @@ public class ResponseBuilder { Template ftl = null; try { - ftl = cfg.getTemplate("get-recordings.ftl"); + ftl = cfg.getTemplate("get-recordings.ftlx"); } catch (IOException e) { log.error("IO exception for get-recordings.ftl : ", e); } @@ -116,7 +116,7 @@ public class ResponseBuilder { } catch (TemplateException e) { log.error("Template exception : ", e); } catch (IOException e) { - log.error("IO exception for get-recordings.ftl : ", e); + log.error("IO exception for get-recordings.ftlx : ", e); } return xmlText.toString(); diff --git a/bbb-common-web/src/test/resources/get-meeting-info.ftl b/bbb-common-web/src/test/resources/get-meeting-info.ftlx similarity index 100% rename from bbb-common-web/src/test/resources/get-meeting-info.ftl rename to bbb-common-web/src/test/resources/get-meeting-info.ftlx diff --git a/bbb-common-web/src/test/resources/get-recordings.ftl b/bbb-common-web/src/test/resources/get-recordings.ftlx similarity index 90% rename from bbb-common-web/src/test/resources/get-recordings.ftl rename to bbb-common-web/src/test/resources/get-recordings.ftlx index 40ab65e9a5..983559d050 100755 --- a/bbb-common-web/src/test/resources/get-recordings.ftl +++ b/bbb-common-web/src/test/resources/get-recordings.ftlx @@ -11,7 +11,7 @@ ${r.getMetadataXml()?html} <#else> - <#include "include-recording.ftl"> + <#include "include-recording.ftlx"> diff --git a/bbb-common-web/src/test/resources/include-recording.ftl b/bbb-common-web/src/test/resources/include-recording.ftlx similarity index 100% rename from bbb-common-web/src/test/resources/include-recording.ftl rename to bbb-common-web/src/test/resources/include-recording.ftlx diff --git a/bigbluebutton-web/web-app/WEB-INF/freemarker/get-meeting-info.ftl b/bigbluebutton-web/web-app/WEB-INF/freemarker/get-meeting-info.ftlx similarity index 100% rename from bigbluebutton-web/web-app/WEB-INF/freemarker/get-meeting-info.ftl rename to bigbluebutton-web/web-app/WEB-INF/freemarker/get-meeting-info.ftlx diff --git a/bigbluebutton-web/web-app/WEB-INF/freemarker/get-meetings.ftl b/bigbluebutton-web/web-app/WEB-INF/freemarker/get-meetings.ftlx similarity index 100% rename from bigbluebutton-web/web-app/WEB-INF/freemarker/get-meetings.ftl rename to bigbluebutton-web/web-app/WEB-INF/freemarker/get-meetings.ftlx diff --git a/bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftl b/bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftlx similarity index 90% rename from bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftl rename to bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftlx index 9041da9c36..6f11b31b0c 100755 --- a/bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftl +++ b/bigbluebutton-web/web-app/WEB-INF/freemarker/get-recordings.ftlx @@ -11,7 +11,7 @@ ${r.getMetadataXml()?html} <#else> - <#include "include-recording.ftl"> + <#include "include-recording.ftlx"> diff --git a/bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftl b/bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftlx similarity index 95% rename from bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftl rename to bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftlx index e58573344f..c6648a4ffb 100755 --- a/bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftl +++ b/bigbluebutton-web/web-app/WEB-INF/freemarker/include-recording.ftlx @@ -59,7 +59,7 @@ <#items as image> <#if image??> - ${image.getAlt()}${image.getValue()!"Link not found."} + ${image.getAlt()?html}${image.getValue()!"Link not found."}