From 620b8f440004d8b1e73cab2ff11a6cba7e64b26e Mon Sep 17 00:00:00 2001
From: Denis Walker <dez@sucs.org>
Date: Sun, 4 Dec 2011 18:25:05 +0000
Subject: [PATCH] Fixes problem with regex for ndash

---
 components/motd.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/motd.php b/components/motd.php
index 2e37c6d..768c483 100644
--- a/components/motd.php
+++ b/components/motd.php
@@ -10,7 +10,7 @@ function decode_entities($text, $quote_style = ENT_COMPAT) {
        $trans_tbl = array_flip($trans_tbl);
        $text = strtr($text, $trans_tbl);
    }
-   $text = preg_replace('&ndash;', '-', $text);
+   $text = preg_replace('~&ndash;~ei', '-', $text);
    $text = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $text);
    $text = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $text);
    return $text;
-- 
GitLab