contao/test — Issue #1543: BBCode: Code makes hardly sense the way it works now
Author: NinaG
Created: 2011-11-29 08:07:09+00:00
State: open
Labels: comments, Defect

The BBCode [code] makes hardly sense the way it works now, because it completely strips out all data instead of transforming it.

If someone wants to post an HTML or PHP code example in the comments, he expects that we see the complete code if he uses the corresponding BBCode [code].

Of course you need to transform the code input, so that it doesn't get executed. But it makes no sense to completely strip it.

If for example someone posts this:

```
[code]

Just a test

[/code]
```

It should be transformed into this (like it does here in the ticket system):

```
<p>
<span class="test">Just a test</span>
</p>
```

Right now it would be like this though, which makes no sense:

```
Just a test
```

--- _Originally created on February 10th, 2010, at 10:42pm (ID 1543)_