diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-08-29 16:16:17 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-08-29 16:16:17 +0200 |
commit | d98ed6874947fd6a70dcf3fddd48b1676df01c43 (patch) | |
tree | c0ffae0272e1c714c7e8d389ee016910737a58b7 /include/markdown.php | |
parent | 42093aedcf9af8433ad9764116b98182e4fba658 (diff) | |
download | volse-hubzilla-d98ed6874947fd6a70dcf3fddd48b1676df01c43.tar.gz volse-hubzilla-d98ed6874947fd6a70dcf3fddd48b1676df01c43.tar.bz2 volse-hubzilla-d98ed6874947fd6a70dcf3fddd48b1676df01c43.zip |
html-to-markdown adds a backslash infront of a hash after each new line - manualy remove those
Diffstat (limited to 'include/markdown.php')
-rw-r--r-- | include/markdown.php | 5 |
1 files changed, 4 insertions, 1 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 +} |