public static String formatHtmlMsg(String msg, boolean encodeHtml) {
        // TODO only replace the non-html tag space;
        String m = encodeHtml(msg);
        m = m.replaceAll("\r?\n", "<br/>");
        String content;
        if (encodeHtml) {
            content = autoLink(autoReviewLink(m).replace(" ", "&nbsp;"));
        } else {
            content = m.replace(" ", "&nbsp;");
        }
        return content;
    }
Get file name from file path

@param path file path
@return file name
src/cn/ieclipse/smartim/common/IMUtils.java