diff --git a/src/plugins/cpaster/kdepasteprotocol.cpp b/src/plugins/cpaster/kdepasteprotocol.cpp index 1b101580dc9fbd266baf1443c54f7ea9e863a965..3664c7dbb4ed75b5119218ad2b382d0fda514a92 100644 --- a/src/plugins/cpaster/kdepasteprotocol.cpp +++ b/src/plugins/cpaster/kdepasteprotocol.cpp @@ -111,6 +111,8 @@ void StickyNotesPasteProtocol::paste(const QString &text, const QString &comment, const QString &description) { + enum { maxDescriptionLength = 30 }; // Length of description is limited. + Q_UNUSED(username) Q_UNUSED(comment); QTC_ASSERT(!m_pasteReply, return); @@ -124,7 +126,7 @@ void StickyNotesPasteProtocol::paste(const QString &text, pasteData += expiryParameter(expiryDays); if (!description.isEmpty()) { pasteData += "&title="; - pasteData += QUrl::toPercentEncoding(description); + pasteData += QUrl::toPercentEncoding(description.left(maxDescriptionLength)); } m_pasteReply = httpPost(m_hostUrl + QLatin1String("api/xml/create"), pasteData);