Minor fix : remove from the element information the html hexadecimal and decimal characters of line feed and carriage return.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5815 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2019-03-31 13:33:48 +00:00
parent 666f03dc23
commit 0528a2526e

View File

@@ -231,9 +231,19 @@ DiagramContext ElementInfoWidget::currentInfo() const
{
DiagramContext info_;
for (ElementInfoPartWidget *eipw : m_eipw_list) {
if (!eipw->text().isEmpty()) { //add value only if they're something to store
info_.addValue(eipw->key(), eipw->text());
for (ElementInfoPartWidget *eipw : m_eipw_list)
{
//add value only if they're something to store
if (!eipw->text().isEmpty())
{
QString txt = eipw->text();
//Replace html line feed
txt.replace("&#xa", " "); //hexa
txt.replace("&#10", " "); //decimal
//Replace html carriage return
txt.replace("&#xd", " "); //hexa
txt.replace("&#13", " "); //decimal
info_.addValue(eipw->key(), txt);
}
}