]> git.mxchange.org Git - friendica.git/blobdiff - include/html2plain.php
bug fix #1115
[friendica.git] / include / html2plain.php
index 0398ea79b074159ff9fa2efa4e8b3ea7761eb492..f09087e0b0179fab68fb4e42328ba5037dbabf61 100644 (file)
@@ -114,11 +114,11 @@ function html2plain($html, $wraplength = 75, $compact = false)
        $message = str_replace("\r", "", $html);
 
        // replace all hashtag addresses
-       if (get_config("system", "remove_hashtags_on_export")) {
+/*     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;
 
@@ -185,8 +185,8 @@ function html2plain($html, $wraplength = 75, $compact = false)
        node2bbcode($doc, 'h6', array(), "\n\n*", "*\n");
 
        // Problem: there is no reliable way to detect if it is a link to a tag or profile
-       //node2bbcode($doc, 'a', array('href'=>'/(.+)/'), ' $1 ', '', true);
-       node2bbcode($doc, 'a', array('href'=>'/(.+)/', 'rel'=>'oembed'), ' $1 ', '', true);
+       //node2bbcode($doc, 'a', array('href'=>'/(.+)/'), ' $1 ', ' ', true);
+       //node2bbcode($doc, 'a', array('href'=>'/(.+)/', 'rel'=>'oembed'), ' $1 ', '', true);
        //node2bbcode($doc, 'img', array('alt'=>'/(.+)/'), '$1', '');
        //node2bbcode($doc, 'img', array('title'=>'/(.+)/'), '$1', '');
        //node2bbcode($doc, 'img', array(), '', '');