MOBILE-4368 icon: Decode HTML entities that may be included in icon url

main
Pau Ferrer Ocaña 2023-10-31 16:21:35 +01:00
parent dd122138d3
commit 9099655f1e
1 changed files with 3 additions and 0 deletions

View File

@ -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);