Closed Bug 564428 Opened 16 years ago Closed 15 years ago

Wrong behaviour after js injection in a page pointing directly to an object (image, swf, etc)

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: aymeric, Unassigned)

Details

(Whiteboard: [CLOSEME 2011-1-30])

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) The problem was discovered with this url : http://www.villiard.com/images/voitures/voiture.jpg Go on this url and put in the address bar following js insertion (that we call "Extract Widget"): javascript:(function(){var d=document;var h=d.getElementsByTagName("head");var s=h.length===0?d.getElementsByTagName("html")[0].insertBefore(d.createElement("HEAD"),d.body):h[0];if(typeof JSON!='object'){var j=d.createElement("SCRIPT");j.charset="utf-8";j.id="jsonscript";j.src="http://www.blimpme.com/bbrowser/json2.js";j=s.appendChild(j);};var b=d.createElement("SCRIPT");b.charset="utf-8";b.src="http://www.blimpme.com/bbrowser/injectold.php?url="+encodeURIComponent(d.location.href);b=s.appendChild(b);})(); Then reload the first url and put in the address bar : javascript:(function(){var d=document;var h=d.getElementsByTagName("head");var s=h.length===0?d.getElementsByTagName("html")[0].insertBefore(d.createElement("HEAD"),d.body):h[0];if(typeof JSON!='object'){var j=d.createElement("SCRIPT");j.charset="utf-8";j.id="jsonscript";j.src="http://www.blimpme.com/bbrowser/json2.js";j=s.appendChild(j);};var b=d.createElement("SCRIPT");b.charset="utf-8";b.src="http://www.blimpme.com/bbrowser/inject.php?url="+encodeURIComponent(d.location.href);b=s.appendChild(b);})(); As you can see the result is different, in the first case we do append to the page the objects that should show buttons with 'Capture 1', 'Capture 2', etc but instead we see the strange result with "xmlns" text and we get the following strange html for the page : <body><img alt="http://www.villiard.com/images/voitures/voiture.jpg" src="http://www.villiard.com/images/voitures/voiture.jpg"><div style="width: 305px; height: 360px; margin: 227px 0pt 0pt 487.5px; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background: url(&quot;http://www.blimpme.com/bbrowser/hmbg.png&quot;) no-repeat scroll 0% 0% transparent; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; top: 0pt; left: 0pt; z-index: 1000000;"><div style="width: 252px; height: 80px; margin: 20px 0pt 0pt 20px; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: hidden; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; cursor: pointer;"><div style="width: 252px; height: 80px; margin: 0pt; padding: 25px 0pt 0pt 85px; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background: url(&quot;http://www.blimpme.com/bbrowser/h.png&quot;) no-repeat scroll 0% 0% transparent; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; top: 0pt; left: 0pt; z-index: 10000001;"><span style="width: auto; height: auto; margin: 0pt; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800;">&lt;span xmlns="http://www.w3.org/1999/xhtml"&gt;Capture 1</span></div></div><div style="width: 252px; height: 80px; margin: 0pt 0pt 0pt 20px; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: hidden; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; cursor: pointer; top: 120px;"><div style="width: 252px; height: 80px; margin: 0pt; padding: 25px 0pt 0pt 85px; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background: url(&quot;http://www.blimpme.com/bbrowser/f.png&quot;) no-repeat scroll 0% 0% transparent; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; top: 0pt; left: 0pt; z-index: 10000001;"><span style="width: auto; height: auto; margin: 0pt; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800;">&lt;span xmlns="http://www.w3.org/1999/xhtml"&gt;Capture 2</span></div></div><div style="width: 252px; height: 80px; margin: 0pt 0pt 0pt 20px; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: hidden; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; cursor: pointer; top: 220px;"><div style="width: 252px; height: 80px; margin: 0pt; padding: 25px 0pt 0pt 85px; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background: url(&quot;http://www.blimpme.com/bbrowser/c.png&quot;) no-repeat scroll 0% 0% transparent; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800; position: absolute; top: 0pt; left: 0pt; z-index: 10000001;"><span style="width: auto; height: auto; margin: 0pt; padding: 0pt; border: 0pt none; font-size: 28px; font-family: arial,sans-serif; display: block; text-align: left; background-repeat: no-repeat; overflow: visible; line-height: normal; -moz-border-radius: 0pt 0pt 0pt 0pt; letter-spacing: 0pt; color: rgb(102, 17, 97); font-weight: 800;">&lt;span xmlns="http://www.w3.org/1999/xhtml"&gt;Manuel</span></div></div></div></body> The second case is a palliative to correct that, we do reload the url inside an iframe and then the extract widget js insertion works correctly. We know it's a very particular case but still needs to be investigated, it behaves as if something was broken in the dom while loading an url pointing directly to an object. Reproducible: Always
Try this more simple case on http://www.villiard.com/images/voitures/voiture.jpg : javascript:(function(){var d=document;var h=d.getElementsByTagName("head");var s=h.length===0?d.getElementsByTagName("html")[0].insertBefore(d.createElement("HEAD"),d.body):h[0];var b=d.createElement("SCRIPT");b.charset="utf-8";b.src="http://www.blimpme.com/bbrowser/bug.js";b=s.appendChild(b);})();
Reporter, are you still seeing this issue with Firefox 3.6.13 or later in safe mode? If not, please close. These links can help you in your testing. http://support.mozilla.com/kb/Safe+Mode http://support.mozilla.com/kb/Managing+profiles You can also try to reproduce in Firefox 4 Beta 8 or later, there are many improvements in the new version, http://www.mozilla.com/en-US/firefox/all-beta.html
Whiteboard: [CLOSEME 2011-1-30]
It's working with FF 3.6.13
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.