You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
moinmoin and textile formats: literal pipes in cells silently split columns #501
tablefmt="moinmoin" and tablefmt="textile" write cell and header values raw, so a literal pipe in the content silently splits the cell — the same class as the mediawiki problem in #499, but with these two formats' own separators:
>>>importtabulate>>>print(tabulate.tabulate([["x | y", "a || b"]], tablefmt="moinmoin"))
||<style="text-align: left;">x|y||<style="text-align: left;">a||b||
|| is the cell separator in MoinMoin tables, so a || b becomes three cells and the style attribute of the second one ends up on a phantom cell. In textile, | is the separator, so x | y splits in two. Rendered on a real MoinMoin wiki or through a textile converter, the data is silently corrupted.
Fix direction
Escape | as | in the cell and header values of both formats — MoinMoin and Textile both pass numeric character references through and render them as the literal character — the same approach the mediawiki fix (#500) uses.
Activity