diff options
author | Mario <mario@mariovavti.com> | 2024-10-02 13:10:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-10-02 13:10:05 +0000 |
commit | 9f49d313f5e9c50873b75d05b48980701361c9c6 (patch) | |
tree | d842a43070290eca10b8ba2134ff635a2fd858d6 /include | |
parent | a5f0253aef7784ace13fa6bd87048b86d9cd50c3 (diff) | |
parent | 803cd74b4881a617a56be4fb5780d6d25fd5433f (diff) | |
download | volse-hubzilla-9f49d313f5e9c50873b75d05b48980701361c9c6.tar.gz volse-hubzilla-9f49d313f5e9c50873b75d05b48980701361c9c6.tar.bz2 volse-hubzilla-9f49d313f5e9c50873b75d05b48980701361c9c6.zip |
Merge branch 'markdown/dont-link-urls-in-code-blocks' into 'dev'
markdown: Don't link URLs in code blocks.
See merge request hubzilla/core!2145
Diffstat (limited to 'include')
-rw-r--r-- | include/markdown.php | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/include/markdown.php b/include/markdown.php index b2adcd0d5..90d671fe4 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -80,22 +80,6 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) { $s = html2bbcode($s); - // $s = bb_code_protect($s); - - // Convert everything that looks like a link to a link - if($use_zrl) { - if (strpos($s,'[/img]') !== false) { - $s = preg_replace_callback("/\[img\](.*?)\[\/img\]/ism", 'use_zrl_cb_img', $s); - $s = preg_replace_callback("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", 'use_zrl_cb_img_x', $s); - } - $s = preg_replace_callback("/([^\]\=\{\/]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)([\,\.\:\;]\s|$)/ismu", 'use_zrl_cb_link',$s); - } - else { - $s = preg_replace("/([^\]\=\{\/]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)([\,\.\:\;]\s|$)/ismu", '$1[url=$2$3]$2$3[/url]$4',$s); - } - - // $s = bb_code_unprotect($s); - // remove duplicate adjacent code tags $s = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/ism","[code]$2[/code]", $s); |