[qet] qet/qet: [5815] Minor fix : remove from the element information the html hexadecimal and decimal characters of line feed and carriage return.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5815
Author:   blacksun
Date:     2019-03-31 15:33:48 +0200 (Sun, 31 Mar 2019)
Log Message:
-----------
Minor fix : remove from the element information the html hexadecimal and decimal characters of line feed and carriage return.

Modified Paths:
--------------
    trunk/sources/ui/elementinfowidget.cpp

Modified: trunk/sources/ui/elementinfowidget.cpp
===================================================================
--- trunk/sources/ui/elementinfowidget.cpp	2019-03-29 21:11:09 UTC (rev 5814)
+++ trunk/sources/ui/elementinfowidget.cpp	2019-03-31 13:33:48 UTC (rev 5815)
@@ -231,9 +231,19 @@
 {
 	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);
 		}
 	}
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/