WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
23382
innerHTML incorrectly converts '>' characters which is not parts of html tags
https://bugs.webkit.org/show_bug.cgi?id=23382
Summary
innerHTML incorrectly converts '>' characters which is not parts of html tags
Joongi Kim
Reported
2009-01-16 05:43:01 PST
Sample Document: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> </head> <body> <div id="test"> asdf<asdf> </div> </body> </html> Expected result of innerHTML property of #test element: "asdf<asdf>" Actual result of innerHTML property of #test element: "asdf<asdf>"
Attachments
innerHTML bug example
(494 bytes, text/html)
2009-01-16 05:49 PST
,
Joongi Kim
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Joongi Kim
Comment 1
2009-01-16 05:49:22 PST
Created
attachment 26791
[details]
innerHTML bug example You can see how webkit is confused with entity conversion of innerHTML.
Joongi Kim
Comment 2
2009-01-16 05:50:53 PST
Comment on
attachment 26791
[details]
innerHTML bug example Expected result (from Mozilla Firefox 3.0.5): asdf<asdf><br> asdf<asdf><br> asdf<asdf>><br> asdf<asdf><br> </asdf></asdf>> Actual Result: asdf<asdf><br> asdf<asdf><br> asdf<asdf>><br> asdf<asdf><br> </asdf></asdf>>
Joongi Kim
Comment 3
2009-01-16 05:55:23 PST
This problem happens also in Google Chrome 1.0.154.43.
Mark Rowe (bdash)
Comment 4
2009-01-16 22:45:18 PST
I see the following with TOT: asdf<asdf><br> asdf<asdf><br> asdf<asdf>><br> asdf<asdf><br> </asdf></asdf>> That matches what Firefox gives.
Alexey Proskuryakov
Comment 5
2009-01-17 04:04:10 PST
Please also note that the previous WebKit behavior was formally correct, too - there is no fundamental reason to convert > to >, it's just something other browser do.
Joongi Kim
Comment 6
2009-01-24 07:05:26 PST
Yes, there's no problem with NOT converting closing '>' to '>', but some users of Textcube which I develope complain of this behaviour. (They and we didn't know before that this is a specific behaviour of Webkit.) Also I'm not sure that this behaviour may affect the backup-restore format called TTXML which has possibilities of contents processed by plain HTML <-> our own markup syntax conversion routines using innerHTML. We hope there be no side-effects from this.
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