Renders the contents of this tag as a bytestring. :param indent_level: Each line of the rendering will be indented this many spaces. :param eventual_encoding: The bytestring will be in this encoding. :param formatter: The output formatter responsible for convert
(
self, indent_level=None, encoding=DEFAULT_OUTPUT_ENCODING,
formatter="minimal")
| 1204 | return ''.join(s) |
| 1205 | |
| 1206 | def encode_contents( |
| 1207 | self, indent_level=None, encoding=DEFAULT_OUTPUT_ENCODING, |
| 1208 | formatter="minimal"): |
| 1209 | """Renders the contents of this tag as a bytestring. |
| 1210 | |
| 1211 | :param indent_level: Each line of the rendering will be |
| 1212 | indented this many spaces. |
| 1213 | |
| 1214 | :param eventual_encoding: The bytestring will be in this encoding. |
| 1215 | |
| 1216 | :param formatter: The output formatter responsible for converting |
| 1217 | entities to Unicode characters. |
| 1218 | """ |
| 1219 | |
| 1220 | contents = self.decode_contents(indent_level, encoding, formatter) |
| 1221 | return contents.encode(encoding) |
| 1222 | |
| 1223 | # Old method for BS3 compatibility |
| 1224 | def renderContents(self, encoding=DEFAULT_OUTPUT_ENCODING, |