handle_data

[internal] handles arbitrary data when constructing DOM tree.

Arguments

Source


def handle_data(self, data):
    if self._is_started:
        text = data.replace('\r\n', '')
        text = text.replace('\n', '')
        self._dom[-1].add_text(text)