From 991e2f7191e527030a0ed5ecd5187ebaf89e380f Mon Sep 17 00:00:00 2001 From: Michael Beckemeyer Date: Fri, 12 Aug 2022 16:25:50 +0200 Subject: [PATCH] Fix display of stars in map.apps 4.14 HTML is now escaped by the updated dgrid for security reasons. Returning { html: ... } is necessary if raw html should be rendered. See also https://github.com/SitePen/dgrid/issues/1419 --- README.md | 2 +- src/main/js/bundles/mapapps-github-manager/BundleStore.js | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d3ef0b7..3debf07 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ This project is intended to be integrated as a bundle to the installation of your map.apps manager. ## Installation Guide -**Requirement: map.apps 4.6.0** +**Requirement: map.apps 4.14** Before you add the Bundle to your manager, please configure the user and the topic property in the manifest.json to point to your GitHub account. Topic can be left empty. You will have to add a released bundle.jar/zip as a bundle in your map.apps manager. diff --git a/src/main/js/bundles/mapapps-github-manager/BundleStore.js b/src/main/js/bundles/mapapps-github-manager/BundleStore.js index 13ab957..bc4ada1 100644 --- a/src/main/js/bundles/mapapps-github-manager/BundleStore.js +++ b/src/main/js/bundles/mapapps-github-manager/BundleStore.js @@ -19,6 +19,7 @@ import TypeFormat from "ct/util/TypeFormat"; import ct_when from "ct/_when"; import apprt_request from "apprt-request"; import d_array from "dojo/_base/array"; +import stringEscape from "apprt-core/string-escape"; export default declare([ComplexMemory], { jsonp: true, @@ -29,8 +30,10 @@ export default declare([ComplexMemory], { // register new formatter at ct/util/TypeFormatter class TypeFormat["stars"] = function (value) { // eslint-disable-next-line max-len - const star = '' - return star + " " + value; + const star = ''; + return { + html: `${star} ${stringEscape(value)}` + }; }; if (TypeFormat["version"]) {