Sanitize shared html

This commit is contained in:
M66B 2019-01-25 06:44:41 +00:00
parent 3da67e9817
commit 1f82015652
1 changed files with 4 additions and 1 deletions

View File

@ -25,6 +25,9 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.view.MenuItem;
import org.jsoup.Jsoup;
import org.jsoup.safety.Whitelist;
import java.util.ArrayList;
import javax.mail.internet.AddressException;
@ -117,7 +120,7 @@ public class ActivityCompose extends ActivityBilling implements FragmentManager.
if (intent.hasExtra(Intent.EXTRA_HTML_TEXT)) {
String html = intent.getStringExtra(Intent.EXTRA_HTML_TEXT);
if (html != null)
args.putString("body", html);
args.putString("body", Jsoup.clean(html, Whitelist.relaxed()));
} else if (intent.hasExtra(Intent.EXTRA_TEXT)) {
String body = intent.getStringExtra(Intent.EXTRA_TEXT);
if (body != null)