+ static QRegExp entityCleaner("&#([0-9]{1,3});");
+ entityCleaner.setMinimal(true);
+
+ int pos = 0;
+
+ while((pos = entityCleaner.indexIn(string, pos)) != -1)
+ {
+ QString match = entityCleaner.cap(1);
+
+ int value = match.toInt();
+
+ if(value >= 1 && value <= 255)
+ {
+ string = string.replace(pos, match.length() + 3, QChar(value));
+ }
+
+ pos += entityCleaner.matchedLength();
+ }
+
+