diff --git a/mo/web/table.py b/mo/web/table.py index 5730f7457c1a33844b8d2803783ce5bd37f63966..4b4a15776665271741238ce4ae4a294764a51e2e 100644 --- a/mo/web/table.py +++ b/mo/web/table.py @@ -55,17 +55,19 @@ class Row: class CellLink(Cell): url: str hint: Optional[str] + html_suffix: Markup - def __init__(self, text: str, url: str, hint: Optional[str] = None): + def __init__(self, text: str, url: str, hint: Optional[str] = None, html_suffix: Markup = Markup("")): Cell.__init__(self, text) self.url = url self.hint = hint + self.html_suffix = html_suffix def to_html(self) -> str: a = '<td><a href="' + escape(self.url) + '"' if self.hint: a += ' title="' + escape(self.hint) + '"' - return a + '>' + escape(self.text) + '</a>' + return a + '>' + escape(self.text) + '</a>' + str(self.html_suffix) class CellCheckbox(Cell):