diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index d066fc5ec..a779095b9 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -182,12 +182,9 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted() for (QTreeWidgetItem *qtwi : ui->m_tree->invisibleRootItem()->takeChildren()) { QString txt = qtwi->text(1); - //Replace html line feed - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal - //Replace html carriage return - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal + //remove line feed and carriage return + txt.remove("\r"); + txt.remove("\n"); m_elmt_info.addValue(qtwi->data(0, Qt::UserRole).toString(), txt); } diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 8f40c11d8..8475be5e7 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -237,12 +237,9 @@ DiagramContext ElementInfoWidget::currentInfo() const if (!eipw->text().isEmpty()) { QString txt = eipw->text(); - //Replace html line feed - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal - //Replace html carriage return - txt.replace(" ", " "); //hexa - txt.replace(" ", " "); //decimal + //remove line feed and carriage return + txt.remove("\r"); + txt.remove("\n"); info_.addValue(eipw->key(), txt); } }