Quoter submodule — pyDHTMLParser 2.0.8 documentation

### Navigation

- index
- modules |
- next |
- previous |
- pyDHTMLParser 2.0.8 documentation »

# Quoter submodule

This module provides ability to quote and unquote strings using backslash notation.

`dhtmlparser.quoter.` `unescape`(inp, quote='"')

  Unescape quote in string inp.

  Example usage:

      >> unescape('hello \"')
      'hello "'

  Parameters: | inp (str) – String in which quote will be unescaped. quote (char, default “) – Specify which character will be unescaped.
  Returns: | Unescaped string.
  Return type: | str

`dhtmlparser.quoter.` `escape`(inp, quote='"')

  Escape quote in string inp.

  Example usage:

      >>> escape('hello "')
      'hello \"'
      >>> escape('hello \"')
      'hello \\"'

  Parameters: | inp (str) – String in which quote will be escaped. quote (char, default “) – Specify which character will be escaped.
  Returns: | Escaped string.
  Return type: | str

### Navigation

- index
- modules |
- next |
- previous |
- pyDHTMLParser 2.0.8 documentation »