mirror of
https://github.com/friendica/friendica
synced 2025-04-25 16:30:10 +00:00
Merge pull request #13880 from MrPetovan/bug/13878-deprecate-star-list
Deprecate use of [*] BBCode tag for list items in favor of [li]
This commit is contained in:
commit
2cc8fcc4aa
6 changed files with 46 additions and 45 deletions
|
@ -1549,9 +1549,6 @@ class BBCode
|
|||
// Check for centered text
|
||||
$text = preg_replace("(\[center\](.*?)\[\/center\])ism", '<div style="text-align:center;">$1</div>', $text);
|
||||
|
||||
// Check for list text
|
||||
$text = str_replace("[*]", "<li>", $text);
|
||||
|
||||
// Check for block-level custom CSS
|
||||
$text = preg_replace('#(?<=^|\n)\[style=(.*?)](.*?)\[/style](?:\n|$)#ism', '<div style="$1">$2</div>', $text);
|
||||
|
||||
|
@ -1591,6 +1588,10 @@ class BBCode
|
|||
$text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '<li>$1</li>', $text);
|
||||
}
|
||||
|
||||
// Check for list text
|
||||
$text = str_replace("[*]", "<li>", $text);
|
||||
$text = str_replace("[li]", "<li>", $text);
|
||||
|
||||
$text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '<th>$1</th>', $text);
|
||||
$text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>', $text);
|
||||
$text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>', $text);
|
||||
|
|
|
@ -89,7 +89,7 @@ class Tos extends BaseModule
|
|||
$rules = "[ol]";
|
||||
foreach (explode("\n", $lines) as $line) {
|
||||
if (trim($line)) {
|
||||
$rules .= "\n[*]" . trim($line);
|
||||
$rules .= "\n[li]" . trim($line);
|
||||
}
|
||||
}
|
||||
$rules .= "\n[/ol]\n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue