widget/reply: formatting syntax for _italics_
[minimedit.git] / upload.inc.php
index 7810ff6e613da2e065264ae954c291a08b72f383..10881a24a0f9317216339e0b88dc65232afc0207 100644 (file)
@@ -52,8 +52,8 @@ function messagehtml($input)
                return $input;  # allow html input as is if privileged
        }
        $html = preg_replace(
-               ["/\r\n?/", "/  +\n/", "/\n/"],
-               ["\n",      "<br />",  "</p>\n<p>"],
+               ["/\r\n?/", "/  +\n/", "/\n/",      '/\b_(\w+)_\b/'],
+               ["\n",      "<br />",  "</p>\n<p>", '<em>$1</em>'  ],
                htmlspecialchars($input)
        );
        return "<p>$html</p>";