Salı 1 May 2012, 18:26
This document uses (almost) all BBCode tags supported by Drupal's BBCode module. You can cut and paste this document into a node to test Drupal's BBCode implementation or to perform some benchmarks.
Normal text formatting
Test bold / strong text
Test italic / emphasised text
Test underlined text
Test strikeout text
Test subscript text - H2O
Test superscript text - X3
Font colors
Test blue text
Test red text
Test green text
Test #eeff00 text
Font sizes
Test 1px - too small, normalized to 6px
Test 12px text
Test 24px text
Test 100px - too big, normalized to 48px
$_SERVER "quoted" \\e\s\c\aped\" - watch out for eval
Font faces
Test Arial typeface text
Test Arial typeface text
Test Courier typeface text
Test Courier New typeface text
Test Impact typeface text
Test Helvetica typeface text
Test Times New Roman typeface text
Test Verdana typeface text
Text alignment
Left hand side of the screen
Right hand side of the screen
Centered
This paragraph is justified on both sided on the page. By default most browsers render text with a jagged right edge. If you want all text rendered like in a book with an even right edge - use the justify tag.
Images
Normal image:
http://upload.wikimedia.org/wikipedia/commons/7/7c/Drupal.ru-Logo.png
Align image right:
http://upload.wikimedia.org/wikipedia/commons/7/7c/Drupal.ru-Logo.png
Image with ALT description:
http://upload.wikimedia.org/wikipedia/commons/7/7c/Drupal.ru-Logo.png
Re-sized image:
http://upload.wikimedia.org/wikipedia/commons/7/7c/Drupal.ru-Logo.png
URL's
www.test-url.com
ftp.test-url.com
http://test-url.com/~user/,part,of,url
ftp://test-url.com:8080/
http://test-url.com/
Test URL
Anchor (bookmark you can link to):
URL Anchor
Some URL's within a sentence: http://url1.com; www.url2.com, (www.url3.com) and www.url4.com. And some more: ftp://url5.com/, (ftp.url6.com/) and ftp.url7.com.
Google link: BBCode
Wikipedia link: BBCode
Youtube video: 0Q2aPi9ZEgs
E-mail addresses
Test@Mail.com
drupal.user@server1.drupal.org
joe@example.com
Joe Smith
Headings
Level 1 Heading
Level 2 Heading
Level 3 Heading
Level 4 Heading
Acronyms and abbreviations
Abbreviations:
API
CMS
WWW
1 inch
Acronyms:
SQL
GIF
radar
Code blocks
Normal code block:
x := y + z;
y := a - b;
An inline code block
Color highlighted PHP code block:
<?php
echo "Sample PHP code";
?>
Test notag:
These BBCode tags are not converted to HTML!
I'm happy
Quoting
A simple quote:
This is a quoted message
Quote with source:
This is a quoted message
Nested quotes:
This is a quoted message
This is a nested quote
Lists
A normal list (circular bullets, same as list=c):
- foo
- bar
- baz
List with circular buttets (list=c):
- x
- y
- z
List with discs (list=d):
- x
- y
- z
List with squares (list=s):
- x
- y
- z
Numeric list (list=1):
- x
- y
- z
Roman lowercase list (list=i):
- x
- y
- z
Roman uppercase list (list=I):
- x
- y
- z
Alpha lowercase list (list=a):
- x
- y
- z
Alpha uppercase list (list=A):
- x
- y
- z
Simple nested lists:
- foo
- bar
- baz
Complex nested list:
- list=foo
- list=s
- list=s
- list=a
- list=I
- list=I
- list=a
- list=bar
- list=A
- list=A
- list=A
- list=baz
- list=d
- list=d
List with php content (watch out for eval):
- {$var $_SERVER "quoted" \\e\s\c\aped\"
Table tags
row1col1
row1col2
row2col1
row2col2
Header1
Header2
row1col1
row1col2
row2col1
row2col2
Other tags
Horizontal delimiter:
Force line break:
–><–
Force space:
–><–
Tag nesting
10px 20px 30px 20px 10px
BLUE RED GREEN BLUE
Arial Century Comic sans MS Arial Arial Bold Italic Arial
Test multi-line tags:
test
Cross site scripting (XSS) vulnerabilities
User-entered text with embedded script tags <script>alert(document.cookie);</script> will be encoded.
Some other exploits:
Size tag
Font tag
Float tag
Anchor
javascript:document.location='http://www.albinoblacksheep.com/flash/you.html';
javascript:alert('XSS')
http://host.com/?act=SR&f='><script>alert(document.cookie)</script>
Broken tags
We need to ensure that bad formatting will not disrupt your site's HTML.
Broken bold text…
- A broken list…
A broken quote…