Tags:
create new tag
, view all tags

Eliminate need for Escapes

What annoys our users the most about TWiki is the need to have escapes in their text that they do not understand why and always forget. The top culprits are &gt; for > and &lt; for <. Many times topics are messed up because users forget about this. Have you ever checked out what happens when you use something like =>30 in a table without escaping it?

We should make our text processing smarter to avoid putting this burden on the user.

It appears that the only reason why we don't take care of this in rendering is the need for html-like syntax for <verbatim> and friends. I would gladly jettison those if I could offer our users editing without the hassles of escaping these characters.

For embedding arbitrary HTML we could have some tag, such as %STARTHTML% or similar. Or we could be parsing the topic to find out when < is the start of a tag and when it is just text.

-- Contributors: ThomasWeigert - 18 Nov 2006

Discussion

completely agree. escaping is no fun at all, and very annoying.

-- KeithHelfrich - 20 Nov 2006

From a usability perspective I totally agree. One related point is the newline, it would be more intuitive to break the line at a newline.

But we cannot switch the syntax and neglect millions of hours worth of content in TWiki pages out there. And no, we cannot delegate that to an upgrade script, the reasons have been stated elsewhere many times.

With a good HTML editor (such as WikiWyg) escapes become less of an issue.

There is actually one more escape, &amp; for &. Most of the time it is not necessary to escape it because TWiki is intelligent enough to escape it properly (in most cases). May be the same can be done intelligently for <? Notice that a single > does not need to be escaped.

-- PeterThoeny - 20 Nov 2006

Hmmmm....

I just noticed that (at least here) < does not need to be escaped . Nor does this > I wonder whether TWiki is actually smarter than we think. Most people put the <= in escape because they are worried that >> mess up the text.

Note that I recently had a table horribly disfigured because there was an => in it...

All the < and > in above were typed in literally.

Maybe this is more an issue of documenting when we need to escape what and when not....

-- ThomasWeigert - 20 Nov 2006

TWiki does indeed apply some voodoo to determine whether a < is the beginning of a HTML or TWiki tag, or whether it is just, well, a '<'. It is hard to tell in some circumstances whether people want to add some HTML or whether they want, for example, to write about HTML.

A config or topic option whether users are allowed to write HTML is at least not so easy to implement. With the current processing sequence, all plugin and variable expansion is done before the text is examined for stray '<' characters, and many of them do return HTML elements on purpose (take %BR% as an example).

I may be wrong, but I guess that enhancing the TWiki voodoo to Do The Right Thing when escaping < is easier than to implement an option, or to generally escape - well, what exactly? and when?

So if you find a table which gets screwed up because of a < or > character, please post the offending element - maybe there's something we can improve.

-- HaraldJoerg - 20 Nov 2006

I just ran into an ChecklistPluginDev#EscapeQuestion re: use of the $percent escape in the EditTablePlugin. I guess this just goes to show how confusing escapes can be, even for someone with years of twiki experience (though, still learning). Imagine how much of a turn-off this is for an end user.

-- KeithHelfrich - 16 Dec 2006

Using some good WYSIWYG editor is the solution for your average end user. Power users and TWiki application developers understand the need for escaping.

-- StephaneLenclud - 17 Dec 2006

I disagree. (And I would imagine that Thomas does too since he started this topic with "what annoys our users most is ...")

Which good WYSIWYG editor is it that allows users to develop their own TWikiApplications ? And having just been through a massive escaping exercise with EditTablePluginBreaksVerbatimOnCairo, I can say with confidence that escaping is no good for power users either.

-- KeithHelfrich - 17 Dec 2006

The ComponentEdit portion of inlineEdit is intended to become a TWikiApplication IDE - though work has stalled due to lack of funding - I need to eat smile

There is also some work in WikiWyg that I am hoping to leverage in a similar way.

-- SvenDowideit - 18 Dec 2006

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2006-12-18 - SvenDowideit
 
  • 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-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.