MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / sanitize_text

Method sanitize_text

pager/pager_display.py:434–443  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

432 # ------------------------------------------------------------------
433
434 def sanitize_text(self, text):
435 if not text:
436 return text
437 replacements = {
438 '\u2018': "'", '\u2019': "'", '\u201c': '"', '\u201d': '"',
439 '\u2013': '-', '\u2014': '-', '\u2026': '...',
440 }
441 for old, new in replacements.items():
442 text = text.replace(old, new)
443 return text
444
445 def draw_icon_scaled(self, x, y, w, h, icon_name):
446 icon_path = self.shared_data.static_images.get(icon_name)

Callers 1

draw_dashboardMethod · 0.95

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected