I really, really do not like the Use-HTML-Wiki switch and I rue the day that
I ever allowed that into the code.  I have no desire to make the situation
worse by making the Use-HTML-Wiki switch even more complicated.

What Use-HTML-Wiki really comes down to is yet another "wiki mode".
Everybody (me included) has their own idea of what markup wiki should
follow.  Popular requests include Creole and Markdown.  It seems to me that
the Use-HTML-Wiki flag and the suggested improvements below are really just
alternative wiki modes.

When I first started writing Fossil, I did not understand how contentious an
issue the choice of wiki markup would become....

In an effort to keep the peace, I am willing to consider enhancements to
Fossil that support varying wiki modes, providing that those enhancements
are carefully designed and thought out and do not become a pile of confused
and discombobulated switches and options that slowly grow by accretion.  The
formatting options should be easily described on one 8.5x11 piece of paper.
Anything more complicated than that is to complicated.

A proposal:

Five wiki modes:  (1) For backwards compatibility, we must support Fossil
wiki (including the safe subset of HTML).  (2) In addition, some people
request unfiltered, pure HTML so that they can edit documents using HTML
editors.  I proposed to also add formatters for (3) Creole and (4)
Markdown.  Finally, we add (5) plain text - no markup at all. No further
options or modes are permitted.  Zero.  Nada.

For embedded documentation, file that end in .html or .htm are rendered as
pure HTML with no interpretation and with no header or footer added.  File
that end in ".wiki" are rendered using Fossil wiki.  Files that end in
".creole" or ".markdown" are rendered using their respective formatters.
Files ending in ".txt" are rendered as plain text.  All wiki files and plain
text files have the standard headers and footers added.

For tickets, wiki, and check-in comments, each repository has global
rendering mode setting which defaults to Fossil Wiki but which can be
changed to one of Pure HTML (with no [...] interpretation, so slightly
different from the current Use-HTML-Wiki flag) or Creole or Markdown or
Plain Text.  All check-in comments are always rendered using the global
rendering mode.  Wiki and Tickets are rendered using the global rendering
mode, but there are special markups that can be specified once near the top
of the document to determine the renderer used for the entire document:

<creole>
<markdown>
<html>
<plaintext>
<fossilwiki>

These rendering-mode selection markups can only appear once and must be the
first text other than whitespace to appear in the document.  It is not
possible to include multiple markup styles in the same document.  It is not
possible to automatically translate from one style to another.

The Use-HTML-Wiki flag will go away (to be replaced by the pure-HTML global
rendering mode).

The document rendering modes are the same for all users, except user will
have to have a special permission flag in order to be able to edit pure HTML
wiki or tickets.  User's without necessary permission will not be allowed to
begin editing documents in pure HTML mode and if they try to change the
rendering mode as part of their edit, their change will not be accepted.

No other modes.  No other customization options.  No other flags or
switches.

Will such an enhancement come closer to meeting peoples needs?


On Sun, Jul 25, 2010 at 4:43 PM, Zed A. Shaw <[email protected]> wrote:

> Alright so I'm going through the code for wiki_convert and thinking
> about the problems I've been having with using HTML for wiki, but having
> that setting bleed into all inputs in the system.
>
> I think I have a simple solution, but let me know what people think:
>
> 1. The setting to use HTML for the wiki should be constrained by whether
> anonymous or nobody can input into that area.  So even though I check
> "HTML for wiki", if anonymous can input wiki, then wiki syntax is used.
> 2. In wiki_convert where the renderer.state is being setup, you'd have a
> flag of something like ANONYMOUS_ALLOWED that'd come
> from the security system by the caller.
> 3. That flag would then disable the WIKI_USE_HTML flag if it this flag
> is set.
>
> This would then prevent people from shooting themselves in the foot, and
> tends to do what people think happens with HTML as wiki.  It's assumed
> that this means, "HTML for wiki where it's safe to do HTML."
>
> I'd be willing to work up the patch on this if people think that's a
> good way to do it  After that I'd like to make the wiki_convert stop
> interpreting wiki links when HTML is on.
>
> --
> Zed A. Shaw
> http://zedshaw.com/
> _______________________________________________
> fossil-users mailing list
> [email protected]
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>



-- 
---------------------
D. Richard Hipp
[email protected]
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to