Ensure we HTML-decode the <title> tag.

Fixes #10020
This commit is contained in:
Greyson Parrelli 2020-09-15 23:05:08 -04:00
parent 19cc43c442
commit 0c73ddc08b

View file

@ -148,7 +148,7 @@ public final class LinkPreviewUtil {
Matcher titleMatcher = TITLE_PATTERN.matcher(html); Matcher titleMatcher = TITLE_PATTERN.matcher(html);
if (titleMatcher.find() && titleMatcher.groupCount() > 0) { if (titleMatcher.find() && titleMatcher.groupCount() > 0) {
htmlTitle = titleMatcher.group(1); htmlTitle = htmlDecoder.fromEncoded(titleMatcher.group(1));
} }
Matcher faviconMatcher = FAVICON_PATTERN.matcher(html); Matcher faviconMatcher = FAVICON_PATTERN.matcher(html);