aboutsummaryrefslogtreecommitdiffstats
path: root/include/bbcode.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-02-15 19:18:49 +0000
committerMario <mario@mariovavti.com>2021-02-15 19:18:49 +0000
commit6f71c6d9501ac740ceab4266d8b7ea1772dc5346 (patch)
tree66521ba3d1cd17db272315ffdeb07b4a8a12657f /include/bbcode.php
parentad0b0364b81c04423e02edd596ebbb5b9b748624 (diff)
downloadvolse-hubzilla-6f71c6d9501ac740ceab4266d8b7ea1772dc5346.tar.gz
volse-hubzilla-6f71c6d9501ac740ceab4266d8b7ea1772dc5346.tar.bz2
volse-hubzilla-6f71c6d9501ac740ceab4266d8b7ea1772dc5346.zip
fix detection of multiline codeblocks after recent change to bbcode()
Diffstat (limited to 'include/bbcode.php')
-rw-r--r--include/bbcode.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index dfc64f814..6bb33671e 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -914,14 +914,14 @@ function bb_code_unprotect_sub($match) {
}
function bb_code($match) {
- if(strpos($match[0], "<br />"))
+ if(strpos($match[0], PHP_EOL))
return '<pre><code>' . bb_code_protect(trim($match[1])) . '</code></pre>';
else
return '<code class="inline-code">' . bb_code_protect(trim($match[1])) . '</code>';
}
function bb_code_options($match) {
- if(strpos($match[0], "<br />")) {
+ if(strpos($match[0], PHP_EOL)) {
$class = "";
$pre = true;
} else {