aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/markdown.php5
-rwxr-xr-xinclude/plugin.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/include/markdown.php b/include/markdown.php
index f4944e2cc..e5f5b9369 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -255,6 +255,9 @@ function bb_to_markdown($Text, $options = []) {
$Text = html2markdown($Text);
+ //html2markdown adds backslashes infront of hashes after a new line. remove them
+ $Text = str_replace("\n\#", "\n#", $Text);
+
// It also adds backslashes to our attempt at getting around the html entity preservation for some weird reason.
//$Text = str_replace(array('&\\_lt\\_;','&\\_gt\\_;','&\\_amp\\_;'),array('<','>','&'),$Text);
@@ -374,4 +377,4 @@ class TableConverter implements ConverterInterface
{
return array('table', 'tr', 'thead', 'td', 'tbody');
}
-} \ No newline at end of file
+}
diff --git a/include/plugin.php b/include/plugin.php
index 23cb2b5f6..ea3c67c2f 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -432,7 +432,7 @@ function insert_hook($hook, $fn, $version = 0, $priority = 0) {
function call_hooks($name, &$data = null) {
$a = 0;
- if((is_array(App::$hooks)) && (array_key_exists($name, App::$hooks))) {
+ if (isset(App::$hooks[$name])) {
foreach(App::$hooks[$name] as $hook) {
$origfn = $hook[1];
if($hook[0])