From 6239c105790666d6e83d236aaf6e3866bfd6d585 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 17 Apr 2020 14:19:38 +0200 Subject: [PATCH] Decode HTML characters --- lib/models/user.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/models/user.dart b/lib/models/user.dart index 1d6d26c..ff55d1d 100644 --- a/lib/models/user.dart +++ b/lib/models/user.dart @@ -1,6 +1,7 @@ import 'package:comunic/enums/user_page_visibility.dart'; import 'package:comunic/helpers/database/database_contract.dart'; import 'package:comunic/models/cache_model.dart'; +import 'package:comunic/utils/ui_utils.dart'; import 'package:meta/meta.dart'; /// Single user information @@ -32,7 +33,7 @@ class User extends CacheModel { String get fullName => firstName + " " + lastName; /// Get user display name - String get displayName => fullName; //TODO : support HTML characters (eg: É => é) + String get displayName => htmlDecodeCharacters(fullName); Map toMap() { return { @@ -53,6 +54,4 @@ class User extends CacheModel { this.virtualDirectory = map[UserTableContract.C_VIRTUAL_DIRECTORY], this.accountImageURL = map[UserTableContract.C_ACCOUNT_IMAGE_URL], super.fromMap(map); - - }