Skip to content

Commit 9099655

Browse files
committed
MOBILE-4368 icon: Decode HTML entities that may be included in icon url
1 parent dd12213 commit 9099655

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/core/components/mod-icon/mod-icon.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { Component, ElementRef, Input, OnChanges, OnInit, SimpleChange } from '@
1717
import { CoreCourse } from '@features/course/services/course';
1818
import { CoreCourseModuleDelegate } from '@features/course/services/module-delegate';
1919
import { CoreSites } from '@services/sites';
20+
import { CoreTextUtils } from '@services/utils/text';
2021
import { CoreUrlUtils } from '@services/utils/url';
2122

2223
const assetsPath = 'assets/img/';
@@ -141,6 +142,8 @@ export class CoreModIconComponent implements OnInit, OnChanges {
141142
return false;
142143
}
143144

145+
this.icon = CoreTextUtils.decodeHTMLEntities(this.icon);
146+
144147
// If it's an Moodle Theme icon, check if filtericon is set and use it.
145148
if (this.icon && CoreUrlUtils.isThemeImageUrl(this.icon)) {
146149
const iconParams = CoreUrlUtils.extractUrlParams(this.icon);

0 commit comments

Comments
 (0)