def cleanHighlights(self, text): """ Clean linebreaks and some html entitíes from the highlights string. """ text = text.replace("\n", " ").replace("\r\n", " ").strip() text = self.removeTags(text) return text.strip()
def _cleanFieldSeparators(self, text): text = self.SEP_RE.sub("\u001f", text) if text.endswith("\u001f"): text = text[:-1] text = text.replace("\u001f", "<span class='fldSep'>|</span>") return text