Browse Source

added spaces (CR)

Signed-off-by: Roland Haeder <roland@mxchange.org>
pull/3287/head
Roland Häder 6 years ago
parent
commit
3051d30c88
No known key found for this signature in database
GPG Key ID: B72F8185C6C7BD78
  1. 9
      include/bbcode.php

9
include/bbcode.php

@ -28,7 +28,7 @@ function bb_PictureCache($matches) {
function bb_map_coords($match) {
// the extra space in the following line is intentional
return str_replace($match[0], '<div class="map" >' . generate_map(str_replace('/',' ', $match[1])) . '</div>', $match[0]);
return str_replace($match[0], '<div class="map" >' . generate_map(str_replace('/', ' ', $match[1])) . '</div>', $match[0]);
}
function bb_map_location($match) {
// the extra space in the following line is intentional
@ -754,9 +754,10 @@ function bb_CleanPictureLinks($text) {
}
function bb_highlight($match) {
if (in_array(strtolower($match[1]),['php','css','mysql','sql','abap','diff','html','perl','ruby',
'vbscript','avrc','dtd','java','xml','cpp','python','javascript','js','sh']))
if (in_array(strtolower($match[1]), ['php', 'css', 'mysql', 'sql', 'abap', 'diff', 'html', 'perl', 'ruby',
'vbscript', 'avrc', 'dtd', 'java', 'xml', 'cpp', 'python', 'javascript', 'js', 'sh'])) {
return text_highlight($match[2],strtolower($match[1]));
}
return $match[0];
}
@ -865,7 +866,7 @@ function bbcode($Text, $preserve_nl = false, $tryoembed = true, $simplehtml = fa
// Handle attached links or videos
$Text = bb_attachment($Text, $simplehtml, $tryoembed);
$Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
$Text = str_replace(array("\r","\n"), array('<br />', '<br />'), $Text);
if ($preserve_nl) {
$Text = str_replace(array("\n", "\r"), array('', ''), $Text);

Loading…
Cancel
Save