WS Code

From WingetWiki

Jump to: navigation, search

WS Code is an abbreviation for Winget Solutions Code, the lightweight markup language used to format posts on our forums. It is based off the popular 'BBCode' used on othersites. The available tags are indicated by rectangular brackets surrounding a keyword, and they are parsed by the message board system before being translated into a markup language that web browsers understand, in this case XHTML.

Purpose

WS Code was devised to provide a safer, easier and more limited way of allowing users to format their messages. Programmer convenience was certainly another factor, as WS Code is very simple to implement. Previously, many message boards allowed the users to include HTML formatting, a side effect of which was that malformed HTML could disrupt the page's layout, or HTML could be used to run JavaScript leading to XSS attacks. Some implementations of BBCode have suffered problems related to the way they translate the BBCode into HTML, which could negate the security that was intended to be given by BBCode. WS Code hopes to eliminate these risks.

WS Code tags

The following are the most common WS Code tags available on our message boards, and are displayed here with their XHTML equivalents. However, it should be noted that the effect of these tags can be changed substantially, and the effect may not be identical on all sites using BBCode.

WS Code XHTML Effect
[b]bolded text[/b] <b>bolded text</b> bolded text
[i]italicized text[/i] <i>italicized text</i> italicized text
[u]underlined text[/u] <span style="text-decoration: underline;">underlined text</span> underlined text
[url]http://wikipedia.org[/url] <a href="http://wikipedia.org">http://wikipedia.org</a> http://wikipedia.org
[url="http://wikipedia.org"]Wikipedia[/url] <a href="http://wikipedia.org" rel="nofollow">Wikipedia</a> Wikipedia
[img]/images/crest_tiny.gif[/img] <img src="/images/crest_tiny.gif" alt="" />
[quote]quoted text[/quote] <blockquote><p>quoted text</p></blockquote>
(usually implemented in more advanced ways)
To quote:

quoted text

[code]monospaced text[/code] <pre>monospaced text</pre> monospaced text
[size="15"]Large Text[/size]
(The unit of measurement varies with each BBCode variant and could represent pixels, points, or relative HTML sizes.)
<span style="font-size:15px">Large Text</span> Large Text
[span color="red"]Red Text[/span]
or

[span color="#FF0000"]Red Text[/span]
(Both HTML color names and hexadecimal color values are supported.)

<span style="color:#FF0000">Red Text</span> Red Text
[:-)]

:)
:smile:

(And other emoticons)

<img src="Face-smile.gif" alt=":)" /> :)

(Specific image and size vary)

Personal tools