MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / renderContents

Method renderContents

thirdparty/beautifulsoup/beautifulsoup.py:818–838  ·  view source on GitHub ↗

Renders the contents of this tag as a string in the given encoding. If encoding is None, returns a Unicode string..

(self, encoding=DEFAULT_OUTPUT_ENCODING,
                       prettyPrint=False, indentLevel=0)

Source from the content-addressed store, hash-verified

816 return self.__str__(encoding, True)
817
818 def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING,
819 prettyPrint=False, indentLevel=0):
820 """Renders the contents of this tag as a string in the given
821 encoding. If encoding is None, returns a Unicode string.."""
822 s=[]
823 for c in self:
824 text = None
825 if isinstance(c, NavigableString):
826 text = c.__str__(encoding)
827 elif isinstance(c, Tag):
828 s.append(c.__str__(encoding, prettyPrint, indentLevel))
829 if text and prettyPrint:
830 text = text.strip()
831 if text:
832 if prettyPrint:
833 s.append(" " * (indentLevel-1))
834 s.append(text)
835 if prettyPrint:
836 s.append("\n")
837
838 return ''.join(s)
839
840 #Soup methods
841

Callers 1

__str__Method · 0.95

Calls 2

__str__Method · 0.45
appendMethod · 0.45

Tested by

no test coverage detected