Clean HTML entities from title.
(self, title_raw: str)
| 169 | return md.strip() |
| 170 | |
| 171 | def clean_title(self, title_raw: str) -> str: |
| 172 | """Clean HTML entities from title.""" |
| 173 | t = re.sub(r"<[^>]+>", "", title_raw) |
| 174 | t = t.replace("&", "&").replace("–", "-") |
| 175 | t = t.replace("&", "&").replace("…", "...") |
| 176 | t = t.replace("—", "--").replace(" ", " ") |
| 177 | return t.strip() |
| 178 | |
| 179 | def slugify(self, text: str) -> str: |
| 180 | """Convert text to URL-safe slug.""" |
no outgoing calls
no test coverage detected