diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 9663235a67..ac694a464a 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3440,6 +3440,10 @@ QUrl QUrl::fromEncoded(const QByteArray &input, ParsingMode mode) /*! Returns a decoded copy of \a input. \a input is first decoded from percent encoding, then converted from UTF-8 to unicode. + + \note Given invalid input (such as a string containing the sequence "%G5", + which is not a valid hexadecimal number) the output will be invalid as + well. As an example: the sequence "%G5" could be decoded to 'W'. */ QString QUrl::fromPercentEncoding(const QByteArray &input) { diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 8df439f7cd..38df38a32f 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -4484,6 +4484,10 @@ void q_fromPercentEncoding(QByteArray *ba) text.data(); // returns "Qt is great!" \endcode + \note Given invalid input (such as a string containing the sequence "%G5", + which is not a valid hexadecimal number) the output will be invalid as + well. As an example: the sequence "%G5" could be decoded to 'W'. + \sa toPercentEncoding(), QUrl::fromPercentEncoding() */ QByteArray QByteArray::fromPercentEncoding(const QByteArray &input, char percent)