RESOLVED FIXED 52508
[gtk] strip NUL characters when copying text/html on GTK+
https://bugs.webkit.org/show_bug.cgi?id=52508
Summary [gtk] strip NUL characters when copying text/html on GTK+
Tony Chang
Reported 2011-01-15 00:53:33 PST
This is a follow up to https://bugs.webkit.org/show_bug.cgi?id=52236. The test editing/pasteboard/copy-null-characters.html tries to copy a text node with a null character and paste it into a content editable field. On the GTK+ port, the pasted text is truncated at the null character. I'm going to skip the test for now and investigate next week.
Attachments
Patch (5.24 KB, patch)
2011-01-26 12:05 PST, Tony Chang
rniwa: review+
Tony Chang
Comment 1 2011-01-26 12:05:11 PST
Ryosuke Niwa
Comment 2 2011-01-26 14:14:27 PST
Comment on attachment 80218 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=80218&action=review > Source/WebCore/ChangeLog:7 > + Please elaborate on what caused the bug and what fix you're doing. > Source/WebCore/editing/markup.cpp:188 > - return String::adopt(result); > + // We remove '\0' characters because they are not visibly rendered to the user. > + return String::adopt(result).replace(0, ""); I don't think this is an efficient way of removing nulls but I don't have an alternative offer. Also, replace doesn't replicate the string when there's no match so this doesn't regress the performance when there are no null characters. In addition, any algorithm to strip null characters will require traversing through the entire string so I'd say r+.
Tony Chang
Comment 3 2011-01-26 14:52:38 PST
WebKit Review Bot
Comment 4 2011-01-26 15:51:00 PST
http://trac.webkit.org/changeset/76723 might have broken Leopard Intel Release (Tests)
Note You need to log in before you can comment on or make changes to this bug.