Defined in packages/acs-core/text-html-procs.tclGiven an HTML fragment, this procedure will close any tags that
have been left open. The optional arguments let you specify that
the fragment is to be truncated to a certain number of displayable
characters. After break_soft, it truncates and closes open tags unless
you're within non-breaking tags (e.g., Af). After break_hard displayable
characters, the procedure simply truncates and closes any open HTML tags
that might have resulted from the truncation.
Note that the internal syntax table dictates which tags are non-breaking.
The syntax table has codes:
- nobr -- treat tag as nonbreaking.
- discard -- throws away everything until the corresponding close tag.
- remove -- nuke this tag and its closing tag but leave contents.
- close -- close this tag if left open.
- Parameters:
-
html_fragment
break_soft (defaults to "0"
) - the number of characters you want the html fragment
truncated to. Will allow certain tags (A, ADDRESS, NOBR) to close first.
break_hard (defaults to "0"
) - the number of characters you want the html fragment
truncated to. Will truncate, regardless of what tag is currently in action.
- Author:
- Jeff Davis <davis@arsdigita.com>