Closed Bug 497547 Opened 16 years ago Closed 16 years ago

Silent failure with style tag in e4x

Categories

(Mozilla Labs :: Jetpack Prototype, defect, P5)

x86
Linux
defect

Tracking

(Not tracked)

RESOLVED INVALID
Future

People

(Reporter: morganrallen, Unassigned)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10 Style tags in an e4x chunk, with valid CSS cause Jetpack features to fail with out error Reproducible: Always Steps to Reproduce: jetpack.statusBar.append({ html: <> <style> .valid { font-size: 8pt; } </style> <div class="valid">test</div> </> }); Actual Results: Nothing get added to the status bar and no error is issued. Expected Results: Status bar get 'test' at 8pt font. Both of these work. jetpack.statusBar.append({ html: <> <div class="valid">test</div> </> }); jetpack.statusBar.append({ html: '<style>.valid { font-size: 8pt; }</style><div class="valid">test</div>' });
Priority: -- → P5
Target Milestone: -- → Future
Turns out this is not a bug. Since E4X uses {whatEver} to to convert variable to XML literals, it is failing on the CSS declarations. It would actually be failing with SyntaxError: missing } in XML expression. (Which is actually thrown to the console now) Solution: CSS should be wrapped in <![CDATA[ body { color: blue; } ]]>
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.