bbcode Testthread

Christian Beer
Christian Beer
Joined: 9 Feb 05
Posts: 20
Credit: 102734
RAC: 0
Topic 91390

Example 1:

HTML paragraph

HTML code

HTML preformated

HTML div

HTML address

BBcode code

Quote:
BBcode quotation

author wrote:
BBcode author quotation

 

~~~ Einstein@Home Project Administrator~~~

Christian Beer
Christian Beer
Joined: 9 Feb 05
Posts: 20
Credit: 102734
RAC: 0

Example 2: <cc_config>   

Example 2:

<cc_config>
    <log_flags>
        <file_xfer>1</file_xfer>
        <sched_ops>1</sched_ops>
        <task>1</task>
        <android_debug>0</android_debug>
    </log_flags>
    </options>
</cc_config>

<cc_config>
    <log_flags>
        <file_xfer>1</file_xfer>
        <sched_ops>1</sched_ops>
        <task>1</task>
        <android_debug>0</android_debug>
    </log_flags>
    </options>
</cc_config>

</p>

<p><cc_config><br />    <log_flags><br />        <file_xfer>1</file_xfer><br />        <sched_ops>1</sched_ops><br />        <task>1</task><br />        <android_debug>0</android_debug><br />    </log_flags><br />    </options><br /></cc_config></p>

<p>

~~~ Einstein@Home Project Administrator~~~

Christian Beer
Christian Beer
Joined: 9 Feb 05
Posts: 20
Credit: 102734
RAC: 0

Example 3: <xml><br />   

Example 3:

<xml><br />    text<br /></xml>

<br /><xml><br />    text<br /></xml><br />

</p>

<p><xml><br />    text<br /></xml></p>

<p>

~~~ Einstein@Home Project Administrator~~~

Shawn Kwang
Shawn Kwang
Joined: 10 Mar 16
Posts: 105
Credit: 5544
RAC: 0

I've turned on the tinyMCE

I've turned on the tinyMCE BBcode plugin. But I am testing what happens if I use the menu-bar to format text. This line is bold because I highlighted it and selected bold in the menu-bar. Here I've underlined a few words by using the menu-bar. Here is strike-out text too. Here is an unordered list

  • bananas
  • apples
  • oranges

Here is some superscripts x3 and a subscript guv. Now I'm using the Preformat format in the menu-bar for some XML:

    
        1
        1
        1
        0
    
    

Now here is a test of a few headings

This line is Header 2.

This line is Header 4.

Here is a link: https://www.albertathome.org. I've not put in any HTML, BBcode, or selecting "link" from the menu-bar. I am now trying to post the comment without a Preview.

~~~ Einstein@Home Project ~~~

Shawn Kwang
Shawn Kwang
Joined: 10 Mar 16
Posts: 105
Credit: 5544
RAC: 0

New post as of changes to

New post as of changes to code from GitHub PR 1658. Here is the testing block again.

This line is bold because I have 
wrapped BBcode bold tags around it.
Here I've underlined a few words by using BBcode tags.
Here is strike-out text too.
Here is an unordered list

  • Oranges
  • Apples
  • Bananas

Here is some superscripts x3 and a subscript guv.
Now I am putting some XML between code tags:

<cc_config>
    <log_flags>
        <file_xfer>1</file_xfer>
        <sched_ops>1</sched_ops>
        <task>1</task>
        <android_debug>0</android_debug>
    </log_flags>
    </options>
</cc_config>

Here is an URL: https://www.albertathome.org. I've not put in any HTML, BBcode, or selected "link" from the menu-bar.

skwang wrote:

Some previous comment that should be quoted.

I've quoted a previous comment above. Now here is an image, HTML code example, and PHP example.

<head>
 <title>Page Title</title>
</head>
<body>
<h2>This is text within an h2 tag, but it should not be formatted with HTML because it is between BBcode  code tags.</h2>
</body>



&lt;?php
function hello()
{
  echo "Hello World!";
}
?&gt;

Back to normal text.

~~~ Einstein@Home Project ~~~

Shawn Kwang
Shawn Kwang
Joined: 10 Mar 16
Posts: 105
Credit: 5544
RAC: 0

Looks like BBcode is more or

Message 80734 in response to message 80733

Looks like BBcode is more or less working, the PHP tag still doesn't work but that's expected and we are moving away from supporting it anyway.

~~~ Einstein@Home Project ~~~

archae86
archae86
Joined: 6 Dec 05
Posts: 10
Credit: 67924
RAC: 0

Shawn Kwang wrote:Looks like

Message 80736 in response to message 80734

Shawn Kwang wrote:
Looks like BBcode is more or less working

I assume this thread reflected part of the development effort that culminated in recent improvement in user thread input over on the main Einstein site.

I am grateful for those improvements.  When the Drupal conversion was new, I found the experience of posting to be almost uniformly painful, with most things I tried (not as experiments, just to communicate) not working.  Now it seems that most things I try work.  That is a big help.

Thanks.

Oliver Behnke
Oliver Behnke
Moderator
Administrator
Joined: 4 Sep 07
Posts: 320
Credit: 8545955
RAC: 0

test

test

Shawn Kwang
Shawn Kwang
Joined: 10 Mar 16
Posts: 105
Credit: 5544
RAC: 0

Post PHP7 upgrade, w/

Post PHP7 upgrade, w/ upgraded BBcode. (Using rich-text editor)

  1. Normal text formatting
  2. Font colours
  3. Font sizes
  4. Font faces
  5. Text alignment
  6. Images
  7. URL's
  8. E-mail addresses
  9. Headings
  10. Level 1 Heading
    1. Level 2 Heading
      1. Level 3 Heading
        1. Level 4 Heading
  11. Acronyms and abbreviations
  12. Code blocks
  13. Quoting
  14. Lists
  15. Table tags
  16. Other tags
  17. Nested and multi-line tags
  18. Cross site scripting (XSS) vulnerabilities
  19. Broken tags

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 colours

Test blue text
Test red text
Test green text
Test #eeff00 text
Some highlighted text

Font sizes

It groows!

Sizes smaller than 50 are treated as px:
Test 1px - too small, normalized to 6px
Test 12px text
Test 24px text
Test 24px text

Sizes 50 and bigger are treated as percentages:
Test 50 - 50%
Test 100 - 100%
Test 150 - 150%

With CSS attributes:
Test xx-small - xx-small
Test x-small - x-small
Test small - small
Test large - large
Test x-large - x-large
Test xx-large - xx-large

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

Centred text

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.

Indented text
Tabbed 20px
Tabbed 30px

Images

Normal image:

Align image right:

Image with ALT description:
From Place Kitten

Re-sized image:

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:

E-mail addresses

Test-[at]-Mail.com
drupal.user-[at]-server1.drupal.org
joe-[at]-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

Colour highlighted PHP code block:



&lt;?php
  echo "Sample PHP code";
?&gt;

Test notag:
These BBCode tags are [b]not[/b] converted to HTML!
[size=20]I'm happy[/size]

Quoting

A simple quote:

Quote:
This is a quoted message

Quote with source:

Frank wrote:
This is a quoted message

Nested quotes:

Gabor wrote:
This is a quoted message
Alastair wrote:
This is a nested quote

Lists

A normal list (circular bullets, same as list=c):

  • foo
  • bar
  • baz

List with circular bullets (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):

  1. x
  2. y
  3. z

Roman lower-case list (list=i):

  1. x
  2. y
  3. z

Roman upper-case list (list=I):

  1. x
  2. y
  3. z

Alpha lower-case list (list=a):

  1. x
  2. y
  3. z

Alpha upper-case list (list=A):

  1. x
  2. y
  3. z

Simple nested lists:

  • foo
    • bar
  • baz

Complex nested list:

  1. list=foo
    • list=s
    • list=s
    1. list=a
      1. list=I
      2. list=I
    2. list=a
  2. list=bar
    1. list=A
    2. list=A
    3. list=A
  3. list=baz
    • list=d
    • list=d

List with php content (watch out for eval):

  • {$var $_SERVER[PHP_SELF] "quoted" \\e\s\c\aped"

Table tags

row1col1 row1col2
row2col1 row2col2



Header1 Header2
row1col1 row1col2
row2col1 row2col2

Other tags

Horizontal delimiter:


Force line break:
--&gt;
&lt;--

Force space:
--&gt; &lt;--

Nested and multi-line tags

Nested:
10px 20px 30px 20px 10px
BLUE RED GREEN BLUE
Arial Century Comic sans MS Arial Arial Bold Italic Arial

Multi-line:


test

Cross site scripting (XSS) vulnerabilities

User-entered text with embedded script tags <script>alert(document.cookie);</script> will be encoded.

Some other exploits:
[=expression(alert(document.cookie));]Size tag[/]
[=expression(alert(document.cookie));]Font tag[/]
[float=expression(alert(document.cookie));]Float tag[/float]
[url=javascript:alert(document.cookie)]Click here to see cookie[/url]
[anchor=javascript:alert(document.cookie)]Anchor[/anchor]
[img]javascript:document.location='http://www.albinoblacksheep.com/flash/you.html'[/img]
[img]javascript:al&#x65rt('XSS')[/img]
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 [b]bold text...

  • A broken list...

    Quote:
    A broken quote...

~~~ Einstein@Home Project ~~~

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.