Fix potential crashes

This commit is contained in:
tom79 2019-06-08 17:45:40 +02:00
parent e39e331aa6
commit f2a7929b76
2 changed files with 2 additions and 2 deletions

View File

@ -3219,7 +3219,7 @@ public class TootActivity extends BaseActivity implements UploadStatusDelegate,
Matcher matcherALink = Patterns.WEB_URL.matcher(content);
while (matcherALink.find()){
final String url = matcherALink.group(1);
content = content.replaceAll(Pattern.quote(url),"abcdefghijklmnopkrstuvw");
content = content.replace(url,"abcdefghijklmnopkrstuvw");
}
}
int contentLength = content.length() - countWithEmoji(content);

View File

@ -577,7 +577,7 @@ public class Status implements Parcelable{
urlText += '…';
}
}
content = content.replaceAll(Pattern.quote(beforemodification),urlText);
content = content.replace(beforemodification,urlText);
}
spannableStringContent = new SpannableString(content);
String spoilerText = "";