Available for: Content Management Server, Template Engine
Task: The command removes unwanted tags and tag attributes from a main content.
Syntax:
filterTags blob blob mode taglist
Function parameters:
blob
is the main content to be filtered.mode
determines how the main content will be
processed. mode
can be one of the following keywords:
allowedTags
: the
taglist
list contains the names of the tags
allowed to occur in the main content. All other tags will be
removed.disallowedTags
: the
taglist
list contains the names of the tags to be
removed from the main content. All other tags will remain in the main
content.taglist
contains the list of tags that are to be
removed from or are to remain in the main content (depending on
mode
). An element of taglist
can
again be a list consisting of two elements. The first element in this list will
be interpreted as a tag name, the second as a list of attributes of this tag.
If mode
equals allowedTags
then the
attributes specified in this list will be left untouched while all others are
removed from the tag. If mode
equals
disallowedTags
then the attributes specified will be removed from
the tag.Return value if successful: the filtered main content.
Necessary permissions (CM only): none.
Example:
filterTags blob $oldBlob allowedTags {p br img}