Skip to content

Commit

Permalink
Merge pull request #1005 from FireMasterK/fix-escaping-xss
Browse files Browse the repository at this point in the history
Fix for potential XSS attacks and formatting issues
  • Loading branch information
Stypox authored Jan 2, 2023
2 parents ce15f7c + 01acf79 commit 991394b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import com.grack.nanojson.JsonParser;
import com.grack.nanojson.JsonParserException;
import com.grack.nanojson.JsonWriter;

import org.jsoup.nodes.Entities;
import org.schabi.newpipe.extractor.MetaInfo;
import org.schabi.newpipe.extractor.downloader.Response;
import org.schabi.newpipe.extractor.exceptions.AccountTerminatedException;
Expand Down Expand Up @@ -967,7 +967,7 @@ public static String getTextFromObject(final JsonObject textObject, final boolea
textBuilder.append("<s>");
}

textBuilder.append(text);
textBuilder.append(Entities.escape(text));

if (strikethrough) {
textBuilder.append("</s>");
Expand Down

0 comments on commit 991394b

Please sign in to comment.