Class HtmlParser

java.lang.Object
com.lowagie.text.xml.XmlParser
com.lowagie.text.html.HtmlParser

@Deprecated(since="2.1.0") public class HtmlParser extends XmlParser
Deprecated.
This class can be used to parse some HTML files. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
  • Constructor Details

    • HtmlParser

      public HtmlParser()
      Deprecated.
  • Method Details

    • parse

      public static void parse(DocListener document, InputSource is)
      Deprecated.
      Parses a given file that validates with the iText DTD and writes the content to a document. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      is - the InputSource with the content
    • parse

      public static void parse(DocListener document, String file)
      Deprecated.
      Parses a given file that validates with the iText DTD and writes the content to a document. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      file - the file with the content
    • parse

      public static void parse(DocListener document, InputStream is)
      Deprecated.
      Parses a given file that validates with the iText DTD and writes the content to a document. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      is - the InputStream with the content
    • parse

      public static void parse(DocListener document, Reader is)
      Deprecated.
      Parses a given file that validates with the iText DTD and writes the content to a document. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      is - the Reader with the content
    • go

      public void go(DocListener document, InputSource is)
      Deprecated.
      Parses a given file. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Overrides:
      go in class XmlParser
      Parameters:
      document - the document the parser will write to
      is - the InputSource with the content
    • go

      public void go(DocListener document, String file)
      Deprecated.
      Parses a given file. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Overrides:
      go in class XmlParser
      Parameters:
      document - the document the parser will write to
      file - the file with the content
    • go

      public void go(DocListener document, InputStream is)
      Deprecated.
      Parses a given file. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      is - the InputStream with the content
    • go

      public void go(DocListener document, Reader is)
      Deprecated.
      Parses a given file. Security consideration: This method accepts input and processes it without built-in validation, filtering, or access restrictions. It may load resources such as local files or external URLs, depending on the input. This can introduce security risks including unauthorized file access, directory traversal, or server-side request forgery (SSRF). It is the responsibility of the calling application to validate and sanitize all input before passing it to this method, especially when handling user-controlled or external data. Refer to established secure coding guidelines to ensure safe usage.
      Parameters:
      document - the document the parser will write to
      is - the Reader with the content