Merge pull request #1006 from TeamNewPipe/yt/fix-html-escape

[YouTube] Fix escaping links in YouTubeParsingHelper.getTextFromObject
This commit is contained in:
Stypox 2023-01-05 19:02:23 +01:00 committed by GitHub
commit 33f9f2cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -937,6 +937,7 @@ public final class YoutubeParsingHelper {
String text = run.getString("text");
if (html) {
text = Entities.escape(text);
if (run.has("navigationEndpoint")) {
final String url = getUrlFromNavigationEndpoint(run
.getObject("navigationEndpoint"));
@ -962,7 +963,7 @@ public final class YoutubeParsingHelper {
textBuilder.append("<s>");
}
textBuilder.append(Entities.escape(text));
textBuilder.append(text);
if (strikethrough) {
textBuilder.append("</s>");