Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(224)

Issue 124051: Bug 714: el.innerHTML = undefined; (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 7 months ago by MikeSamuel
Modified:
16 years, 7 months ago
Reviewers:
felix8a
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

http://code.google.com/p/google-caja/issues/detail?id=714 in browsers, that stringifies undefined and you see 'undefined'. in caja, domita.js setInnerHTML says sanitizeHtml(String(htmlFragment || '')) which turns undefined into '' instead. this is mostly an issue of developer-friendliness. eg, someone says el.innerHTML = foo(); and expects that to show something helpful, even if foo() is buggy. instead, it shows nothing, and it's unclear whether the call to foo() happened at all. Fixed setInnerHtml in DOMita and added tests. Submitted @3755

Patch Set 1 #

Patch Set 2 : Bug 714: el.innerHTML = undefined; #

Patch Set 3 : Bug 714: el.innerHTML = undefined; #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -5 lines) Patch
M src/com/google/caja/plugin/domita.js View 1 2 1 chunk +12 lines, -5 lines 1 comment Download
M tests/com/google/caja/plugin/domita_test_untrusted.html View 1 2 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 4
MikeSamuel
16 years, 7 months ago (2009-09-25 22:56:58 UTC) #1
felix8a
the rcdata logic is slightly confusing, it took a few tries to convince myself that ...
16 years, 7 months ago (2009-09-25 23:08:11 UTC) #2
felix8a
the rcdata logic is slightly confusing, it took a few tries to convince myself that ...
16 years, 7 months ago (2009-09-25 23:08:12 UTC) #3
felix8a
16 years, 7 months ago (2009-09-25 23:22:16 UTC) #4
lgtm

http://codereview.appspot.com/124051/diff/1006/8
File src/com/google/caja/plugin/domita.js (right):

http://codereview.appspot.com/124051/diff/1006/8#newcode2265
Line 2265: htmlFragmentString = '' + htmlFragment;
oops, yeah.  sorry I didn't catch that.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b