mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-22 10:46:50 +00:00
Fix HTML unescaped encoded entities in link preview issue.
This commit is contained in:
committed by
Cody Henthorne
parent
d690a52fd7
commit
9b0dec7ece
@@ -2,6 +2,7 @@ package org.thoughtcrime.securesms.linkpreview;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.text.HtmlCompat;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
@@ -71,14 +72,15 @@ public class LinkPreview {
|
||||
}
|
||||
|
||||
public @NonNull String getTitle() {
|
||||
return title;
|
||||
return HtmlCompat.fromHtml(title, 0).toString();
|
||||
}
|
||||
|
||||
public @NonNull String getDescription() {
|
||||
if (description.equals(title)) {
|
||||
return "";
|
||||
} else {
|
||||
return HtmlCompat.fromHtml(description, 0).toString();
|
||||
}
|
||||
return description;
|
||||
}
|
||||
|
||||
public long getDate() {
|
||||
|
||||
Reference in New Issue
Block a user