]> git.mxchange.org Git - friendica.git/commitdiff
removing of hashtag addresses is now hidden behind a configuration
authorMichael Vogel <icarus@dabo.de>
Sun, 19 May 2013 09:08:08 +0000 (11:08 +0200)
committerMichael Vogel <icarus@dabo.de>
Sun, 19 May 2013 09:08:08 +0000 (11:08 +0200)
include/bbcode.php
include/html2plain.php

index 5b676bbadbf16adc628d37aaad9c7b7ee5789ee4..3e3345035e0e11208186c3ee7df5ee90ab3831c6 100644 (file)
@@ -673,7 +673,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
        //}
 
        // Remove all hashtag addresses
-       if (!$tryoembed) {
+       if (!$tryoembed AND get_config("system", "remove_hashtags_on_export")) {
                $pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
                $Text = preg_replace($pattern, '#$2', $Text);
        }
@@ -684,4 +684,3 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true, $simplehtml = fal
 
        return $Text;
 }
-
index 80768ffff7424c2ecd46dce168e01ee313da2c65..677faa9d584b97d6605a3d5d5d7b0a89609692b2 100644 (file)
@@ -108,8 +108,10 @@ function html2plain($html, $wraplength = 75, $compact = false)
        $message = str_replace("\r", "", $html);
 
        // replace all hashtag addresses
-       $pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
-       $message = preg_replace($pattern, '#$2', $message);
+       if (get_config("system", "remove_hashtags_on_export")) {
+               $pattern = '/#<a.*?href="(.*?)".*?>(.*?)<\/a>/is';
+               $message = preg_replace($pattern, '#$2', $message);
+       }
 
        $doc = new DOMDocument();
        $doc->preserveWhiteSpace = false;