]> git.mxchange.org Git - friendica.git/blobdiff - include/html2plain.php
Add a missing relation
[friendica.git] / include / html2plain.php
index 54cc44794dc9e3a1ca96a622df0008bb78cd2b7b..dc2cb137c49358e986f513860c5dda7d8f2b049e 100644 (file)
@@ -49,7 +49,7 @@ function quotelevel($message, $wraplength = 75)
 
        $newlines = array();
        $level = 0;
-       foreach($lines as $line) {;
+       foreach ($lines as $line) {;
                $line = trim($line);
                $startquote = false;
                while (strpos("*".$line, '[quote]') > 0) {
@@ -113,12 +113,6 @@ function html2plain($html, $wraplength = 75, $compact = false)
 
        $message = str_replace("\r", "", $html);
 
-       // replace all hashtag addresses
-       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 +179,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(), '', '');
@@ -239,4 +233,4 @@ function html2plain($html, $wraplength = 75, $compact = false)
 
        return(trim($message));
 }
-
+?>