AgenturPottkinder / typo3_forum

An Extbase-based TYPO3 Extension which is called typo3_forum
http://www.mittwald.de
GNU General Public License v2.0
35 stars 54 forks source link

Possible Bug with the BBCode RegExps #346

Open ineswillenbrock opened 4 years ago

ineswillenbrock commented 4 years ago

TYPO3 9.5.13 typo3_forum 1.2 migrated from mm_forum via typo3_forum 1.1.1 PHP 7.2

There seem to be some trouble with the regular expressions - but my knowledge there is nearly zero.

I write something like this:

spielwiese [b]fett[/b] im satz. und noch ein [b]fett[/b] und ein einzelnes [u]underline[/u]
ein neuer absatz
und noch einer mit [b]fettem[/b] satzteil

The part between the first [b] and the last [/b] is set in bold, and the [b] and [/b] between that are not replaced like shown in the screenshot. The newline after the `[/u]´ and "absatz" seems to break that behaviour.

The used regular expression is /\[b\](.*)\[\/b\]/i

Any ideas?

Screenshot_20200221_204227_regexp_trouble

ineswillenbrock commented 4 years ago

If one modifies the regular expression like so /\[b\](.*)\[\/b\]/iU -- adds an "U" to it -- it works fine. Do you want/need a patch for that?

Rinxiao commented 3 years ago

I can confirm that this is still an issue in

TYPO3 10.4.10 typo3_forum 1.0-dev PHP 7.3

The regular expression fix works, though. It would be nice if this would be included in the standard setup, so you don't have to fix it manually afterwards.