forked from EVOgeek/Vmeda.Online
MOBILE-4368 icon: Decode HTML entities that may be included in icon url
parent
dd122138d3
commit
9099655f1e
|
@ -17,6 +17,7 @@ import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChange } from '@
|
||||||
import { CoreCourse } from '@features/course/services/course';
|
import { CoreCourse } from '@features/course/services/course';
|
||||||
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
|
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
|
||||||
import { CoreSites } from '@services/sites';
|
import { CoreSites } from '@services/sites';
|
||||||
|
import { CoreTextUtils } from '@services/utils/text';
|
||||||
import { CoreUrlUtils } from '@services/utils/url';
|
import { CoreUrlUtils } from '@services/utils/url';
|
||||||
|
|
||||||
const assetsPath = 'assets/img/';
|
const assetsPath = 'assets/img/';
|
||||||
|
@ -141,6 +142,8 @@ export class CoreModIconComponent implements OnInit, OnChanges {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.icon = CoreTextUtils.decodeHTMLEntities(this.icon);
|
||||||
|
|
||||||
// If it's an Moodle Theme icon, check if filtericon is set and use it.
|
// If it's an Moodle Theme icon, check if filtericon is set and use it.
|
||||||
if (this.icon && CoreUrlUtils.isThemeImageUrl(this.icon)) {
|
if (this.icon && CoreUrlUtils.isThemeImageUrl(this.icon)) {
|
||||||
const iconParams = CoreUrlUtils.extractUrlParams(this.icon);
|
const iconParams = CoreUrlUtils.extractUrlParams(this.icon);
|
||||||
|
|
Loading…
Reference in New Issue