summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-08-19 16:21:49 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-08-21 17:50:39 +0200
commitf45efafacfc9c4e033dd6777bc9f985a76eedd66 (patch)
tree1ac51f88b374e349fce6c07d450c1a609cbe2339 /src
parentdd6080ceac38c84581c89c77eb0d7d8285b55c94 (diff)
QTextCodec::codecForHtml looks at the first 1024 bytes
The HTML 5 spec requires it, instead of only looking at the first 512. Task-number: QTBUG-40383 Change-Id: Ie10cf8c745ed1a3402914e126a02bc43d5035fff Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 7e3e629c47..9bce7bf614 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -1045,7 +1045,7 @@ QTextCodec *QTextCodec::codecForHtml(const QByteArray &ba, QTextCodec *defaultCo
// determine charset
QTextCodec *c = QTextCodec::codecForUtfText(ba, 0);
if (!c) {
- QByteArray header = ba.left(512).toLower();
+ QByteArray header = ba.left(1024).toLower();
int pos = header.indexOf("meta ");
if (pos != -1) {
pos = header.indexOf("charset=", pos);