diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-08-19 16:21:49 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-08-21 17:50:39 +0200 |
commit | f45efafacfc9c4e033dd6777bc9f985a76eedd66 (patch) | |
tree | 1ac51f88b374e349fce6c07d450c1a609cbe2339 /src | |
parent | dd6080ceac38c84581c89c77eb0d7d8285b55c94 (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.cpp | 2 |
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); |