/* ** This file is part of Vidalia, and is subject to the license terms in the ** LICENSE file, found in the top level directory of this distribution. If you ** did not receive the LICENSE file with this file, you may obtain it from the ** Vidalia source package distributed by the Vidalia Project at ** http://www.vidalia-project.net/. No part of Vidalia, including this file, ** may be copied, modified, propagated, or distributed except according to the ** terms described in the LICENSE file. */ /* ** \file html.cpp ** \version $Id$ ** \brief HTML formatting functions */ #include "html.h" /** Wraps a string in "
" tags, converts "\n" to "
" and converts "\n\n"
* to a new paragraph. */
QString
p(QString str)
{
str = "
" + str + "
"; str.replace("\n\n", "");
str.replace("\n", "
");
return str;
}
/** Wraps a string in "" tags. */
QString
i(QString str)
{
return QString("%1").arg(str);
}
/** Wraps a string in "" tags. */
QString
b(QString str)
{
return QString("%1").arg(str);
}
/** Wraps a string in "" tags. */
QString
trow(QString str)
{
return QString(" %1 ").arg(str);
}
/** Wraps a string in "