diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-05-09 14:52:45 +0200 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2017-06-07 14:20:47 +0000 |
commit | fa19227c3ac7df7c0d2f8a548a9a36ac9a7b803c (patch) | |
tree | f25e8bf0aea2d8194f39ac0d0495de12ae48b289 /src/webenginewidgets/api/qwebenginecontextmenudata.cpp | |
parent | 1ad5b3b680d71ab6f97503398fbcc4c0f313aacb (diff) | |
download | qtwebengine-fa19227c3ac7df7c0d2f8a548a9a36ac9a7b803c.tar.gz |
Fix copying JavaScript URLs
Wire unfiltered link URL to the API layer.
[ChangeLog][QtWebEngine] linkUrl member of
QWebEngineContextMenuData and ContextMenuRequest was previously
returning with "about:blank" in case of non-standard URLs.
Now it contains the unvalidated URL and CopyLinkToClipboard action
has been fixed to handle such URLs (like javascript:) correctly.
Task-number: QTBUG-59307
Change-Id: I2e49767e1cc9ec8324d230c1bf346e21d7b8d9bb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebenginecontextmenudata.cpp')
-rw-r--r-- | src/webenginewidgets/api/qwebenginecontextmenudata.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp index 5d68ed0ec..63e11175b 100644 --- a/src/webenginewidgets/api/qwebenginecontextmenudata.cpp +++ b/src/webenginewidgets/api/qwebenginecontextmenudata.cpp @@ -148,10 +148,11 @@ QString QWebEngineContextMenuData::linkText() const /*! Returns the URL of a link if the context is a link. + It is not guaranteed to be a valid URL. */ QUrl QWebEngineContextMenuData::linkUrl() const { - return d ? d->linkUrl() : QUrl(); + return d ? d->unfilteredLinkUrl() : QUrl(); } /*! |