def METHOD_NAME(self, md):
    """Escape all."""
    config = self.getConfigs()
    hardbreak = config['hardbreak']
    md.inlinePatterns.register(
        EscapeAllPattern(ESCAPE_NO_NL_RE if hardbreak else ESCAPE_RE, config['nbsp'], md),
        "escape",
        180
    )
    md.postprocessors.register(EscapeAllPostprocessor(md), "unescape", 10)
    if config['hardbreak']:
        md.inlinePatterns.register(SubstituteTagInlineProcessor(HARDBREAK_RE, 'br'), "hardbreak", 5.1)