<?php
$content = '[h1]MAIN FEATURES[/h1] [list] [*]Doubles https://steamcommunity.com/games/227300/announcements/detail/1294067099912833659 [*]Background screen options [*]Changed light flares on the player and AI vehicles https://steamcommunity.com/games/227300/announcements/detail/1335730452506903011 [/list] [h1]MINOR CHANGES[/h1] [list][*]Auxiliary brakes system support (engine brake and retarder in one control element)[/*][*]Fixed licence plate change in states/countries where no city formats exist[/*][*]Fixed brake vs parking brake behavior[/*][*]Fixed tire noise of silent tires[/*][*]Retarder improvement (better cruise control behavior, no braking with throttle, icon when moving only)[/*][*]Steam Inventory support to allow for distributing rewards from upcoming World of Trucks events[/*][/list] If you wish to participate in the open beta, you can find this version in the public_beta branch on Steam. The way to access it is as follows: Steam client → LIBRARY → right click on Euro Truck Simulator 2 → Properties → Betas tab → public_beta → 1.28 public beta. No password required. During open betas, there is a dedicated beta site for World of Trucks, which is used to safely test all new features.';
function bb($content) {
$search = array (
/*'#\[\*\](.*)\[/\*\]#iUs',*/ '#\[\*]([^[]*(?:\[(?!/?\*]|/list])[^[]*)*)(?:\[/\*])?#i',
'#\[list\](.+)\[\/list\]#iUs',
'#\[list=1\](.+)\[\/list\]#iUs',
'#\[IMG\](.+)\[\/IMG\]#iUs'
);
$replace = array (
'<li>$1</li>',
'<ul>$1</ul>',
'<ol>$1</ol>',
'<img src="$1"/>'
);
$newtext = preg_replace($search, $replace, $content);
$newtext = nl2br($newtext);
$newtext = preg_replace('#<br />(\s*<br />)+#', '<br />', $newtext);
return $newtext;
}
echo bb($content);
[h1]MAIN FEATURES[/h1] <ul> <li>Doubles https://steamcommunity.com/games/227300/announcements/detail/1294067099912833659 </li><li>Background screen options </li><li>Changed light flares on the player and AI vehicles https://steamcommunity.com/games/227300/announcements/detail/1335730452506903011 </li></ul> [h1]MINOR CHANGES[/h1] <ul><li>Auxiliary brakes system support (engine brake and retarder in one control element)</li><li>Fixed licence plate change in states/countries where no city formats exist</li><li>Fixed brake vs parking brake behavior</li><li>Fixed tire noise of silent tires</li><li>Retarder improvement (better cruise control behavior, no braking with throttle, icon when moving only)</li><li>Steam Inventory support to allow for distributing rewards from upcoming World of Trucks events</li></ul> If you wish to participate in the open beta, you can find this version in the public_beta branch on Steam. The way to access it is as follows: Steam client → LIBRARY → right click on Euro Truck Simulator 2 → Properties → Betas tab → public_beta → 1.28 public beta. No password required. During open betas, there is a dedicated beta site for World of Trucks, which is used to safely test all new features.