diff options
author | Andrew Manning <andrewmanning@grid.reticu.li> | 2017-08-05 11:24:03 +0000 |
---|---|---|
committer | Andrew Manning <andrewmanning@grid.reticu.li> | 2017-08-05 11:24:03 +0000 |
commit | 03ca0bfa696a76e20ac00525676c9943a25b0370 (patch) | |
tree | ec838248a1be34522ce698210c57169180261442 /include/markdown.php | |
parent | ba62f144823fd2ee31e3c19eb2c1cb10782c9184 (diff) | |
parent | a618f70f56efdcaaf9da6dcfcab9cce6a933303b (diff) | |
download | volse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.tar.gz volse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.tar.bz2 volse-hubzilla-03ca0bfa696a76e20ac00525676c9943a25b0370.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into doco
Diffstat (limited to 'include/markdown.php')
-rw-r--r-- | include/markdown.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/markdown.php b/include/markdown.php index 530af57a0..0cd9ab237 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -157,11 +157,11 @@ function bb_to_markdown($Text, $options = []) { * Transform #tags, strip off the [url] and replace spaces with underscore */ - $Text = preg_replace_callback('/#\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/[(zu)]rl\]/i', + $Text = preg_replace_callback('/#\[([zu])rl\=(.*?)\](.*?)\[\/[(zu)]rl\]/i', create_function('$match', 'return \'#\'. str_replace(\' \', \'_\', $match[3]);'), $Text); - $Text = preg_replace('/#\^\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/([zu])rl\]/i', '[$1rl=$2]$3[/$4rl]', $Text); + $Text = preg_replace('/#\^\[([zu])rl\=(.*?)\](.*?)\[\/([zu])rl\]/i', '[$1rl=$2]$3[/$4rl]', $Text); // Converting images with size parameters to simple images. Markdown doesn't know it. $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text); @@ -197,9 +197,6 @@ function bb_to_markdown($Text, $options = []) { // Remove empty zrl links $Text = preg_replace("/\[zrl\=\].*?\[\/zrl\]/is", "", $Text); - // escape all unconverted tags - $Text = escape_tags($Text); - $Text = trim($Text); call_hooks('bb_to_markdown', $Text); |