WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
154676
Webkit adds multiple to HTML pasted into contenteditable element.
https://bugs.webkit.org/show_bug.cgi?id=154676
Summary
Webkit adds multiple to HTML pasted into contenteditable element.
j.swiderski
Reported
2016-02-25 07:02:38 PST
Created
attachment 272201
[details]
Sample page which shows how browsers sees HTML. Safari Version : 9.0.3 (11601.4.4) Other browsers tested: Chrome: Fail, version: 48.0.2564.116 m Firefox: OK IE: OK ---- What steps will reproduce the problem? 1. Open attached sample in a browser. 2. Go to
https://en.wikipedia.org/wiki/HTTPS
and copy first paragraph (from HTTPS to
https://en.wikipedia.org/wiki/HTTPS
) 3. Paste it in editable element, click the "Get HTML" button and observe what HTML gets produced. ---- What is the expected result? The expected HTML is without being inserted before closing and after opening span tag. If I go to
https://en.wikipedia.org/wiki/HTTPS
and execute below in console everything seems to be in order console.log(document.getElementById('mw-content-text').getElementsByTagName('p')[0].innerHTML); Also viewing HTML with dev-tools doesn't show any ---- What happens instead? There are   being inserted before closing and after opening span tag. Please provide any additional information below. Attach a screenshot if possible. I have tested this on Windows 7 and Mac 10.11
Attachments
Sample page which shows how browsers sees HTML.
(484 bytes, text/html)
2016-02-25 07:02 PST
,
j.swiderski
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
j.swiderski
Comment 1
2016-02-25 07:10:11 PST
I have made one mistake: copy first paragraph (from HTTPS to exchanged data)...
Ahmad Saleem
Comment 2
2022-12-18 05:39:13 PST
I am able to reproduce this across all browsers (Safari 16.2, Safari Technology Preview 160, Chrome Canary 111 and Firefox Nightly 110) by copying first paragraph and it shows 13 matches for " " across all browsers and all showing after start of span tag and also just before ending tag of span. Either I am not reproducing it right (which might be the cause) or this is consistent for all.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug