From 9099655f1ec50e693662fdd1752704909543d217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 31 Oct 2023 16:21:35 +0100 Subject: [PATCH] MOBILE-4368 icon: Decode HTML entities that may be included in icon url --- src/core/components/mod-icon/mod-icon.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/components/mod-icon/mod-icon.ts b/src/core/components/mod-icon/mod-icon.ts index a51788f87..d35294ff7 100644 --- a/src/core/components/mod-icon/mod-icon.ts +++ b/src/core/components/mod-icon/mod-icon.ts @@ -17,6 +17,7 @@ import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChange } from '@ import { CoreCourse } from '@features/course/services/course'; import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate'; import { CoreSites } from '@services/sites'; +import { CoreTextUtils } from '@services/utils/text'; import { CoreUrlUtils } from '@services/utils/url'; const assetsPath = 'assets/img/'; @@ -141,6 +142,8 @@ export class CoreModIconComponent implements OnInit, OnChanges { return false; } + this.icon = CoreTextUtils.decodeHTMLEntities(this.icon); + // If it's an Moodle Theme icon, check if filtericon is set and use it. if (this.icon && CoreUrlUtils.isThemeImageUrl(this.icon)) { const iconParams = CoreUrlUtils.extractUrlParams(this.icon);