Class YoutubeDescriptionHelper

java.lang.Object
org.schabi.newpipe.extractor.services.youtube.YoutubeDescriptionHelper

public final class YoutubeDescriptionHelper extends Object
  • Method Details

    • attributedDescriptionToHtml

      @Nullable public static String attributedDescriptionToHtml(@Nullable com.grack.nanojson.JsonObject attributedDescription)
      Parse a video description in the new "attributed" format, which contains the entire visible plaintext (content) and an array of commandRuns and styleRuns. Returns the formatted content in HTML format, and escapes the text to make sure there are no XSS attacks.

      commandRuns include the links and their range in the text, while styleRuns include the styling to apply to various ranges in the text.

      Parameters:
      attributedDescription - the JSON object of the attributed description
      Returns:
      the parsed description, in HTML format, as a string