MOBILE-2993 grades: Fix icon class parsing

main
Albert Gasset 2019-04-25 16:31:17 +02:00
parent 265f4a40f4
commit a34f3ae7a9
1 changed files with 2 additions and 2 deletions

View File

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