Description: If you copy / paste a picture from Firefox when URL picture has parenthesis, unexpectedly the "insert section" dialog is opened. Steps to Reproduce: 1.Open Firefox, on the wikipedia.org main page https://en.wikipedia.org/wiki/Main_Page 2.Locate a picture linked with a link which has parenthesis inside... example :https://en.wikipedia.org/wiki/File:Witi_Ihimaera_(cropped).jpg 3. With the right click open menu and do "copy picture" 3.Go to LibreOffice (Windows), open a Writer document, paste picture with Ctrl-V for example 4. the "insert section" dialog is opened instead the paste action. Actual Results: Insert Section dialog is opened. Expected Results: Picture is pasted Reproducible: Always User Profile Reset: No Additional Info: Windows version only. tested on : Version: 7.0.7.0.M7 (x64) Build ID: 28389a78c38535f0b4229ebc43797bd90d7a15a2 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: fr-FR (fr_FR); Langue IHM : fr-FR Calc: CL Version: 7.2.2.2 (x64) / LibreOffice Community Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: fr-FR (fr_FR); UI: fr-FR Calc: CL
Firefox version is 94.0.2 (64 bits) Important : paste is ok with Chrome Version 96.0.4664.45 (64 bits)
Confirmed using LO Version: 7.3.0.0.alpha1+ (a0a38b88dc3a61d212d784f41a27f97d9c2d7f32), 3.3.0 / Windows. When looking at the clipboard content using Clipboard Inspector [1], the immediate, and perhaps single difference between Windows and Linux (in Linux there's no problem) is that in Windows the <img> element in the text/html content is enclosed as such: <html><body> <!--StartFragment--> <img ...> <!--EndFragment--> </body> </html> In Linux there's only a <img ...> element. Interesgintly when pasting via Paste Special, any of the following choices paste the image: - Stripped HyperText Markup Language (Simple HTML), - HTML format without comments, - Bitmap Image (BMP). [1] https://evercoder.github.io/clipboard-inspector/
Unfortunately, I cannot repro using Version: 7.2.3.2 (x64) / LibreOffice Community Build ID: d166454616c1632304285822f9c83ce2e660fd92 CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: default; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: threaded, neither with Version: 7.3.0.0.alpha1+ (x64) / LibreOffice Community Build ID: b7a46259eba35257291fe00851252c18ffb4fc90 CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: fr-FR (ru_RU); UI: en-US Calc: CL and Firefox 94.0.2 (64-bit). Pasting image from the Wikimedia page linked from comment 0 (using Ctrl+V) copied using "Copy Image" context menu (is that the correct menu item?) just inserts the image normally. I don't know what might be the difference - is that UI language of LibreOffice? Settings of Firefox? Localized version of Windows? its installed updates? Anyway, it would possibly help if you prepare a clipboard snapshot - using NirSoft's Inside Clipboard [1]. Attaching a .Clp file created by the tool here could help to eliminate some of unknowns from the equation. (Please check locally, that the .Clp file, when loaded back after changing clipboard content, does cause the same problem pasting into Writer.) [1] https://www.nirsoft.net/utils/inside_clipboard.html
Created attachment 176486 [details] Clipboard data Here's a .clp file with clipboard data I can reproduce the bug with.
(In reply to Aron Budea from comment #4) Thanks a lot - repro!
Created attachment 176591 [details] Clipboard data from Firefox Windows Here is clipboard data from Firefox 94.0.2 (64 bits)
This should be fixed now as Luboš added WebP support in bug 114532. I'm not sure if the insert section dialog can still be triggered by pasting unexpected content, as Mike has also added a couple of changes, let's close this for now.
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0599a73c3c2bffdbfa4e695e2d694f1947215a07 tdf#145875 don't open Insert section dialog when pasting image It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Szymon Kłos committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/daafc32c5625757091e7cf80711a18639bd36bf0 tdf#145875 don't open Insert section dialog when pasting image It will be available in 7.3.5. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.