diff --git a/components/motd.php b/components/motd.php
index 075ea1c67a30d4bd2de151384cc89875be894c90..b72819d6391f40319dcef0dac26c778bed467e70 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\;~ei', '-', $text);
+   $text = preg_replace('~&ndash\;~i', '-', $text);
    $text = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $text);
    $text = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $text);
    return $text;