We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Support Web>DisableHTML (17 Apr 2002, PeterThoeny)
Tags:
create new tag
, view all tags

Question

I'd like to disable HTML in my Twiki. Unfortunately, i couldn't find any hints how to do that -- neither in the docs nor in the FAQ or TWiki.cfg. .

  • TWiki version: 1.16

-- TWikiGuest - 13 Apr 2002

Answer

This isn't supported by TWiki. You might be able to write a plugin to do this (try deleting all HTML tags), but since TWiki creates its own HTML tags as part of rendering, this would have to run very early in the page rendering process.

-- RichardDonkin - 14 Apr 2002

This is currently not in TWiki. You can however filter all tags in a Plugin. Write your own plugin or add the filter to the DefaultPlugin, function startRenderingHandler: (This code has not been tested)

    # filter out all HTML
    $_[0] =~ s/<\/?[a-z][^>]+>//gois;

Note that this will filter out any HTML, including TWiki's own, like <nop> escapes for WikiWords, or when users enter angle brackets as part of a formula, e.g. a<b

See also SanitisingHTML.

-- PeterThoeny - 11 Apr 2002

Topic revision: r3 - 17 Apr 2002 - 05:45:00 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback