mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-09-15 08:20:18 +03:00
Disable HTML parsing in display names (fix #1291)
This commit is contained in:
parent
3d83d3fa31
commit
18e666649e
2 changed files with 3 additions and 6 deletions
|
@ -95,7 +95,7 @@ public class Account implements Serializable {
|
|||
if (display_name == null || display_name.isEmpty()) {
|
||||
display_name = username;
|
||||
}
|
||||
return SpannableHelper.convert(context, display_name, null, this, null, viewWeakReference, null, true, false);
|
||||
return SpannableHelper.convert(context, display_name, null, this, null, viewWeakReference, null, false, false);
|
||||
}
|
||||
|
||||
public synchronized Spannable getSpanDisplayNameEmoji(Activity activity, WeakReference<View> viewWeakReference) {
|
||||
|
|
|
@ -1011,14 +1011,11 @@ public class SpannableHelper {
|
|||
|
||||
public static Spannable convertEmoji(Activity activity, String text, Account account, WeakReference<View> viewWeakReference) {
|
||||
|
||||
SpannableString initialContent;
|
||||
if (text == null) {
|
||||
return null;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
initialContent = new SpannableString(Html.fromHtml(text, Html.FROM_HTML_MODE_LEGACY));
|
||||
else
|
||||
initialContent = new SpannableString(Html.fromHtml(text));
|
||||
|
||||
SpannableString initialContent = new SpannableString(text);
|
||||
|
||||
SpannableStringBuilder content = new SpannableStringBuilder(initialContent);
|
||||
List<Emoji> emojiList = account.emojis;
|
||||
|
|
Loading…
Reference in a new issue