Merge branch 'dev' into 'dev'
bbcode map bypass wasn't catching all map forms. See merge request hubzilla/core!1647
This commit is contained in:
commit
71ecb470b6
@ -985,19 +985,22 @@ function bbcode($Text, $options = []) {
|
||||
|
||||
// leave open the posibility of [map=something]
|
||||
// this is replaced in prepare_body() which has knowledge of the item location
|
||||
|
||||
if (! $cache) {
|
||||
if ($cache) {
|
||||
$Text = str_replace([ '[map]','[/map]' ], [ '','' ], $Text);
|
||||
$Text = preg_replace('/[map=(.*?)\]/ism','$1',$Text);
|
||||
}
|
||||
else {
|
||||
if (strpos($Text,'[/map]') !== false) {
|
||||
$Text = preg_replace_callback("/\[map\](.*?)\[\/map\]/ism", 'bb_map_location', $Text);
|
||||
}
|
||||
if (strpos($Text,'[map=') !== false) {
|
||||
$Text = preg_replace_callback("/\[map=(.*?)\]/ism", 'bb_map_coords', $Text);
|
||||
}
|
||||
if (strpos($Text,'[map]') !== false) {
|
||||
$Text = preg_replace("/\[map\]/", '<div class="map"></div>', $Text);
|
||||
}
|
||||
}
|
||||
if (strpos($Text,'[map]') !== false) {
|
||||
$Text = preg_replace("/\[map\]/", '<div class="map"></div>', $Text);
|
||||
}
|
||||
|
||||
|
||||
// Check for bold text
|
||||
if (strpos($Text,'[b]') !== false) {
|
||||
$Text = preg_replace("(\[b\](.*?)\[\/b\])ism", '<strong>$1</strong>', $Text);
|
||||
|
Reference in New Issue
Block a user