mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 21:45:20 +00:00
Update link preview meta tag regex.
This commit is contained in:
parent
e67eca77ff
commit
1e27847015
@ -171,7 +171,7 @@ public class LinkPreviewRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private @NonNull Optional<String> getProperty(@NonNull String searchText, @NonNull String property) {
|
private @NonNull Optional<String> getProperty(@NonNull String searchText, @NonNull String property) {
|
||||||
Pattern pattern = Pattern.compile("<\\s*meta\\s+property\\s*=\\s*\"\\s*og:" + property + "\\s*\"\\s+content\\s*=\\s*\"(.*?)\"\\s*/?\\s*>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
|
Pattern pattern = Pattern.compile("<\\s*meta\\s+property\\s*=\\s*\"\\s*og:" + property + "\\s*\"\\s+[^>]*content\\s*=\\s*\"(.*?)\"[^>]*/?\\s*>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
|
||||||
Matcher matcher = pattern.matcher(searchText);
|
Matcher matcher = pattern.matcher(searchText);
|
||||||
|
|
||||||
if (matcher.find()) {
|
if (matcher.find()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user