Ensure inner html is escaped when bolding.

Fixes #12033
fork-5.53.8
Greyson Parrelli 2022-03-03 09:40:55 -05:00 zatwierdzone przez Alex Hart
rodzic 56a8451d07
commit 9d9e6e2972
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -1,9 +1,11 @@
package org.thoughtcrime.securesms.util;
import android.text.Html;
import androidx.annotation.NonNull;
public class HtmlUtil {
public static @NonNull String bold(@NonNull String target) {
return "<b>" + target + "</b>";
return "<b>" + Html.escapeHtml(target) + "</b>";
}
}