[Webkit-unassigned] [Bug 52236] Strip NUL character when copying text on Windows

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 14:43:03 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=52236





--- Comment #8 from Alexey Proskuryakov <ap at webkit.org>  2011-01-11 14:43:02 PST ---
HTML5 goes to great lengths trying to avoid having null characters in Unicode strings, but I don't think that it generally makes sense. Replacing null with U+FFFD during parsing is particularly weird, because one can always use DOM manipulation to insert a null (as it's done in attached test case), so there is no guarantee of "no null in DOM" anyway.

When copying, we should just make sure that the user gets expected results. As WebKit doesn't display nulls in content, they should be removed in copied text, not replaced with U+FFFD.

> Seems like we need to have setting textContent go through the HTML parser and the HTML parser needs to insert the replacement character.

I don't think that it's the right direction. There are many ways to insert a null via DOM manipulation, and even HTML5 doesn't prohibit those.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list