diff options
| author | hmeland | 1999-06-04 15:13:43 +0000 |
|---|---|---|
| committer | hmeland | 1999-06-04 15:13:43 +0000 |
| commit | 3c61e2d2d49bbd8b34120991273e6bd779e0148e (patch) | |
| tree | 85d48f6e8a321bc46eb06b1999142899908f2256 /Mailman/htmlformat.py | |
| parent | 8a21ae471b2fe833c8c42e1629f1645a0971a1ec (diff) | |
| download | mailman-3c61e2d2d49bbd8b34120991273e6bd779e0148e.tar.gz mailman-3c61e2d2d49bbd8b34120991273e6bd779e0148e.tar.zst mailman-3c61e2d2d49bbd8b34120991273e6bd779e0148e.zip | |
Diffstat (limited to 'Mailman/htmlformat.py')
| -rw-r--r-- | Mailman/htmlformat.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Mailman/htmlformat.py b/Mailman/htmlformat.py index 78693423f..0905dabde 100644 --- a/Mailman/htmlformat.py +++ b/Mailman/htmlformat.py @@ -30,6 +30,7 @@ for python and, recursively, for nested HTML formatting objects. import types import string import mm_cfg +import Utils # Format an arbitrary object. @@ -304,6 +305,15 @@ class StdContainer(Container): return output +class QuotedContainer(Container): + def Format(self, indent=0): + # If I don't start a new I ignore indent + output = '<%s>%s</%s>' % ( + self.tag, + Utils.QuoteHyperChars(Container.Format(self, indent)), + self.tag) + return output + class Header(StdContainer): def __init__(self, num, *items): self.items = items @@ -321,7 +331,7 @@ class Bold(StdContainer): class Italic(StdContainer): tag = 'em' -class Preformatted(StdContainer): +class Preformatted(QuotedContainer): tag = 'pre' class Subscript(StdContainer): |
