Commit 0bb579ce authored by Thomas Baumgart's avatar Thomas Baumgart
Browse files

Show complete account names when they have '<' in their name

When an account name contains the less-than character followed by text,
that part is removed from the name in HTML based views (home view and
reports).

Escaping the less-than and greater-than characters to their HTML
equivalent solves the problem and all of the name is displayed.

BUG: 424188

(cherry picked from commit 5ce75274)
parent b027e5dd
......@@ -1806,7 +1806,7 @@ QString PivotTable::renderHTML() const
.arg(rowname.isTopLevel() ? " id=\"topparent\"" : "")
.arg("") //.arg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank
.arg(rowname.hierarchyDepth() - 1)
.arg(rowname.name().replace(QRegExp(" "), "&nbsp;"))
.arg(rowname.name().replace(QRegExp(" "), "&nbsp;").replace("<", "&lt;").replace(">", "&gt;"))
.arg((m_config.isConvertCurrency() || !rowname.isForeignCurrency()) ? QString() : QString(" (%1)").arg(rowname.currency().id()));
// Don't print this row if it's going to be all zeros
......@@ -1859,7 +1859,7 @@ QString PivotTable::renderHTML() const
.arg(rownum & 0x01 ? "even" : "odd")
.arg(m_config.detailLevel() == eMyMoney::Report::DetailLevel::All ? "id=\"solo\"" : "")
.arg(rowname.hierarchyDepth() - 1)
.arg(rowname.name().replace(QRegExp(" "), "&nbsp;"))
.arg(rowname.name().replace(QRegExp(" "), "&nbsp;").replace("<", "&lt;").replace(">", "&gt;"))
.arg((m_config.isConvertCurrency() || !rowname.isForeignCurrency()) ? QString() : QString(" (%1)").arg(rowname.currency().id()));
}
......
......@@ -222,7 +222,7 @@ public:
if (acc.isClosed()) {
tmp += QLatin1String("<strike>");
}
tmp += acc.name();
tmp += acc.name().replace("<", "&lt;").replace(">", "&gt;");
if (acc.isClosed()) {
tmp += QLatin1String("</strike>");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment