Ensure inner html is escaped when bolding.

Fixes #12033
This commit is contained in:
Greyson Parrelli
2022-03-03 09:40:55 -05:00
committed by Alex Hart
parent 56a8451d07
commit 9d9e6e2972

View File

@@ -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>";
}
}