summaryrefslogtreecommitdiffstats
path: root/src/xml/dom/qdom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xml/dom/qdom.cpp')
-rw-r--r--src/xml/dom/qdom.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xml/dom/qdom.cpp b/src/xml/dom/qdom.cpp
index 95fde4e4f6..766ca51ec3 100644
--- a/src/xml/dom/qdom.cpp
+++ b/src/xml/dom/qdom.cpp
@@ -5684,24 +5684,24 @@ static QByteArray encodeEntity(const QByteArray& str)
QByteArray tmp(str);
int len = tmp.size();
int i = 0;
- const char* d = tmp.data();
+ const char* d = tmp.constData();
while (i < len) {
if (d[i] == '%'){
tmp.replace(i, 1, "&#60;");
- d = tmp;
+ d = tmp.constData();
len += 4;
i += 5;
}
else if (d[i] == '"') {
tmp.replace(i, 1, "&#34;");
- d = tmp;
+ d = tmp.constData();
len += 4;
i += 5;
} else if (d[i] == '&' && i + 1 < len && d[i+1] == '#') {
// Dont encode &lt; or &quot; or &custom;.
// Only encode character references
tmp.replace(i, 1, "&#38;");
- d = tmp;
+ d = tmp.constData();
len += 4;
i += 5;
} else {