Merge pull request #1868 from albertgasset/MOBILE-2993

MOBILE-2993 grades: Fix icon class parsing
main
Juan Leyva 2019-04-30 21:07:30 +02:00 committed by GitHub
commit d49aeb5e1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -544,8 +544,8 @@ export class CoreGradesHelperProvider {
row['image'] = src[1];
} else if (text.indexOf('<i ') > -1) {
row['itemtype'] = 'unknown';
const src = text.match(/class="fa-([^ ]*)"/);
row['icon'] = src[1];
const src = text.match(/<i class="(?:[^"]*?\s)?(fa-[a-z0-9-]+)/);
row['icon'] = src ? src[1] : '';
}
}