[Israel.pm] markup language for web forum

Gabor Szabo gabor at perl.org.il
Thu Jun 17 05:36:12 PDT 2004

I still need your feedback. In the next lines I describe my plan for the
markup language. I'd appreciate if someone (or rather somefew) looked at
it an told me if I left out something important ? Thanks.

We will start to use a partial set of the BBCode but with a few

In BBCode you can use a small set of markup such as
[b]text[/b] to make your text bold
[code]Some program[/code] to mark an are to be code.

Because we don't use the <> marks for our mark up we can safely
know that any <> or any other funny character should be taken
literally and turned into the appropriate HTML entity, except the [
and the ] markup characters.

In order to let us further expand our markup language we do not
allow the user to add the [ or ] characters to his text. This would of
course create problems in Perl code so within [code][/code] pair you can
freely use any character (well, except [/code] itself),
and we'll show all the characters verbatim.

In order to avoid accepting postings today that will break when we
add more tags, we will reject any submission that is not correctly marked up.

Allowed tags:
    CODE here can contain any character including <>[], the only thing
    it cannot include is the [/code] substring. No markup is possible
    inside. CODE will be show in as it is typed.
    Just like CODE , it can contain any character except
    [/text] It will be shown differently from code section. (Most
    likely different background color and
    different font. Otherwise it is still show as you type.

  Free text which is not enclosed in any of the above sections can
    contain some markup using [ characters. If we encounter [
    characters in any other situation we don't accept the submission.

    [b]BOLD[/b]                     to show text bold
    [url=http://blabla]Title[/url]  to create a link
    [url]http://blabla[/url]        the url being the title
    [email=me at you.com]Title[/email]
    [email]me at you.com[/email]

    http://www.blabla.com           magic linking
    me at you.com                      magic linking

    [[]                             to show a [ character
    []]                             to show a ] character

    At this point we won't allow nesting of markups.
    Again: any other use of the [ and ] characters will be rejected.


ps. I still wonder if I should use [[] for escapng [ or is [[ enough ?

More information about the Perl mailing list