X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fhtml2plain.php;h=ed338ce71002672c6fbf217941e98eba125efc96;hb=f96423feae227e5def8b90ced82ee3405b24f068;hp=0398ea79b074159ff9fa2efa4e8b3ea7761eb492;hpb=1a5da0ae60b2be930e4cd76b28e34aeb550935f0;p=friendica.git diff --git a/include/html2plain.php b/include/html2plain.php index 0398ea79b0..ed338ce710 100644 --- a/include/html2plain.php +++ b/include/html2plain.php @@ -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>/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,3 @@ function html2plain($html, $wraplength = 75, $compact = false) return(trim($message)); } -?>