diff --git a/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html b/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html index 4ab42f08d..235c51297 100644 --- a/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html +++ b/src/addon/mod/glossary/components/index/addon-mod-glossary-index.html @@ -41,7 +41,7 @@ {{ 'addon.mod_glossary.entriestobesynced' | translate }} -

{{entry.concept}}

+

@@ -53,7 +53,7 @@ -

{{entry.concept}}

+

diff --git a/src/addon/mod/glossary/components/index/index.ts b/src/addon/mod/glossary/components/index/index.ts index c12178ba2..41bfbd760 100644 --- a/src/addon/mod/glossary/components/index/index.ts +++ b/src/addon/mod/glossary/components/index/index.ts @@ -320,7 +320,12 @@ export class AddonModGlossaryIndexComponent extends CoreCourseModuleMainActivity this.fetchFunction = this.glossaryProvider.getEntriesByLetter; this.fetchInvalidate = this.glossaryProvider.invalidateEntriesByLetter; this.fetchArguments = [this.glossary.id, 'ALL']; - this.getDivider = (entry: any): string => entry.concept.substr(0, 1).toUpperCase(); + this.getDivider = (entry: any): string => { + // Try to get the first letter without HTML tags. + const noTags = this.textUtils.cleanTags(entry.concept); + + return (noTags || entry.concept).substr(0, 1).toUpperCase(); + }; this.showDivider = (entry?: any, previous?: any): boolean => { return !previous || this.getDivider(entry) != this.getDivider(previous); };