mirror of
https://github.com/friendica/friendica
synced 2025-04-24 08:30:11 +00:00
Mentions are now displayed much faster. Attention: The related database update can last more than one minute.
bbcode: The generated HTML is now cleaned up every time (using the DOM) since it happened that bad html broke the network page.
This commit is contained in:
parent
c26cf428a6
commit
8cef0fa80d
9 changed files with 48 additions and 21 deletions
|
@ -603,7 +603,8 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||
|
||||
// Clean up the HTML by loading and saving the HTML with the DOM
|
||||
// Only do it when it has to be done - for performance reasons
|
||||
if (!$tryoembed) {
|
||||
// Update: Now it is done every time - since bad structured html can break a whole page
|
||||
//if (!$tryoembed) {
|
||||
$doc = new DOMDocument();
|
||||
$doc->preserveWhiteSpace = false;
|
||||
|
||||
|
@ -618,7 +619,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
|
|||
$Text = str_replace('<br></li>','</li>', $Text);
|
||||
|
||||
$Text = mb_convert_encoding($Text, "UTF-8", 'HTML-ENTITIES');
|
||||
}
|
||||
//}
|
||||
|
||||
call_hooks('bbcode',$Text);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue