create new tag
, view all tags
Proposal: add a <literal> block type to protect HTML.

Every so often I want to embed HTML cut-and-pasted from elsewhere, or a fragment of script, or an applet or object tag, or a textarea. With the current processing I can't.

There's a simple solution to this; add a literal block tag that lifts out such code before TWiki processing is applied. For example:


<script language="JavaScript">
function wahey() {

<textarea rows="15" cols="80">
Here is the text I wante you to cut and paste
    * This is a list
    * Which TWiki will munge without the literal tag

With the generalisation of the takeOutVerbatim method in the LocationLocationLocation patch, this would be a trivial 5-minute job to add.

FWIW with the <literal> tag the implementation of ?raw=on&contenttype=text/plain&skin=text also becomes trivial.

-- CrawfordCurrie - 06 Oct 2004

I note also that we often want to reuse such literals. In effect the 'type' parameter of CommentPlugin provides the insertion and reuse of arbitrary components: I'd be tempted to generalise and rename Comment to COMPONENT and pull in by reference the block you want. HTML can get very messy, so there might be an argument for keeping such blocks on special topics.

Can you remind me how it is different to <verbatim> ?

-- MartinCleaver - 06 Oct 2004

Verbatim substitutes < and > and encases it in pre block. Visual effect only.

-- CrawfordCurrie - 06 Oct 2004

Thanks, I was being thick! I did realise what it did but you beat me to getting back to the topic!

-- MartinCleaver - 06 Oct 2004

VaidotasBarzdenas, you voted http://twiki.org/cgi-bin/rdiff/Codev/EmbeddedHTMLInTopics?type=last&render=sequential&context=9000&_foo=1.7#diff001 do you really only want this a little or actually quite a lot? (both ends of this scale are positive, unlike some)

-- MartinCleaver - 10 Aug 2005

i think its a brilliant idea, lets do it ASAP!

-- TravisBarker - 12 Aug 2005

and just to argue with you for fun, i would say "I want this so much it hurts" is negative, if it hurts, thats a bummer, regardless of why smile


-- TravisBarker - 12 Aug 2005

This seems to be implemented but not documented. We might as well document the feature.

-- PeterThoeny - 08 Jun 2006


-- WillNorris - 08 Jun 2006

Share your opinion of this idea by selecting one of the radio buttons below and clicking the button.
It would be nice ... 1 2 3 4 5 6 7 8 9 ... I want this so much it hurts

Average desireability: 7.0     Number of votes: 6
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2006-06-21 - SteffenPoulsen
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.