nicer nl on every skin + bug with mailto:
authorx2000habouzit <x2000habouzit>
Sun, 24 Oct 2004 16:56:13 +0000 (16:56 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 24 Oct 2004 16:56:13 +0000 (16:56 +0000)
htdocs/css/nl.css
include/newsletter.inc.php

index fbf003c..8a95f4b 100644 (file)
@@ -25,7 +25,6 @@ div.nl {
     width: 64ex;
     text-align: justify;
     font-size: 10pt;
-    background: white;
 }
 
 div.nl a { text-decoration: none; }
@@ -38,9 +37,10 @@ div.nl div.title {
     border: 1px black solid;
     font-size: 140%;
     text-align: center;
-    color: #ff4040;
-    background: #ffffb0;
-    border: 2px #ff4040 solid;
+    color: inherit;
+    color: blue;
+    background: #eeeeee;
+    border: 2px #cccccc solid;
 }
 
 div.nl div.lnk {
@@ -55,16 +55,12 @@ div.nl h1 {
     padding: 2px 4ex 2px 0ex;
     width: 60ex;
     font-size: 100%;
-    border-bottom: 1px #ff4040 solid;
 }
 
 div.nl h1 span {
-    color: #ff4040;
-    background: #ffffb0;
     text-decoration: none;
     font-size: 140%;
     padding: 2px 1ex 2px 1ex;
-    border: 1px #ff4040 solid;
 }
 
 div.nl h2 {
@@ -81,7 +77,6 @@ div.nl h2 span {
     background: #eeeeee;
     text-decoration: none;
     padding: 2px 4px 2px 4px;
-    border: 1px #cccccc solid;
 }
 
 div.nl div.art {
index 8ad872a..cf192e8 100644 (file)
@@ -18,7 +18,7 @@
  *  Foundation, Inc.,                                                      *
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************
-        $Id: newsletter.inc.php,v 1.22 2004-10-21 13:12:06 x2000habouzit Exp $
+        $Id: newsletter.inc.php,v 1.23 2004-10-24 16:56:13 x2000habouzit Exp $
  ***************************************************************************/
 
 define('FEMME', 1);
@@ -420,14 +420,14 @@ function enriched_to_text($input,$html=false,$just=false,$indent=0,$width=68) {
        $text = str_replace('[u]','<span style="text-decoration: underline">', $text);
        $text = str_replace('[/u]','</span>', $text);
        $text = preg_replace('!((https?|ftp)://[^\r\n\t ]*)!','<a href="\1">\1</a>', $text);
-       $text = preg_replace('!([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)!','<a href="mailto:\1">\1</a>', $text);
+       $text = preg_replace('!(([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)(?:\?[^\r\n\t ]*)?)!','<a href="mailto:\1">\2</a>', $text);
        return nl2br($text);
     } else {
        $text = preg_replace('!\[\/?b\]!','*',$text);
        $text = preg_replace('!\[\/?u\]!','_',$text);
        $text = preg_replace('!\[\/?i\]!','/',$text);
        $text = preg_replace('!((https?|ftp)://[^\r\n\t ]*)!','[\1]', $text);
-       $text = preg_replace('!([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)!','[mailto:\1]', $text);
+       $text = preg_replace('!(([a-zA-Z0-9\-_+.]*@[a-zA-Z0-9\-_+.]*)(?:\?[^\r\n\t ]*)?)!','[mailto:\1]', $text);
        $text = $just ? justify($text,$width-$indent) : wordwrap($text,$width-$indent);
        if($indent) {
            $ind = str_pad('',$indent);