Open Bug 262267 Opened 20 years ago Updated 12 years ago

wyciwyc added to bookmarked url

Categories

(SeaMonkey :: Bookmarks & History, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: jagrboom, Unassigned)

Details

(Whiteboard: [2012 Fall Equinox])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20040929
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20040929

If one writes on a html document with a timeout, like below

<html>
<head>
<script type="text/javascript">
function rewrite() {
    document.write("<html><body><h1>rewritten</h1></body></html>");
    document.close();
    }
</script>
</head>
<body onload="setTimeout(rewrite,3000)">
<h1>waiting...</h1>
</body>
</html>

the page will be bookmarked with the following prefix in its url:

wyciwyg://0/

The timeout can be 0, and the setTimeout can also be placed within the body tags
  with the same results.

Reproducible: Always
Steps to Reproduce:
1. Open the html example above in your browser
2. Choose file bookmark and look at the location field of the popup
3.

Actual Results:  
wyci less than wyg 

Expected Results:  
wyci precisely wyg

Perhaps (or perhaps not) you wonder why anyone would want to write such evil
code.    I've used it for a document loaded from a chrome url that calls a
script (with a timeout thus) which processes the bookmarks datasource. On
windows (not on linux), without the timeout, and only on startup, sometimes,
some bookmarks related function would return null, preventing the creation of
the page. Since this only happened on startup, I figured that a small pause
might give mozilla the time to finish its presumably unfinished initialization.
If you have a better idea, please let me know.
Summary: wyciwyc added to bookmarked url → wyciwyc added to bookmarked url
I thought I had found a work around for this bug with putting 	  

window.QueryInterface( Components.interfaces.nsIInterfaceRequestor )
.getInterface( Components.interfaces.nsIWebNavigation )
.currentURI.spec = document.location.href; 

after the document.close() (in a document loaded from a chrome url that is).
However, when another page is loaded and then the back button clicked, mozilla
crashes. 

The setTimeout seems indeed to do what I wanted it to do (make sure the page
gets properly created), so I wouldn't like to just take it out.

However, the page I'm creating is supposed to be a startup page 
( bookmarkshome.mozdev.org ) and bookmarking it and backnavigating to it are
therefore things that should definitely work. So, if you're reading this and you
know a better work around or a good alternative for the setTimeout, please let
me know!!

Jeroen
Product: Browser → Seamonkey
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
I'd guess bookmarks should use createExposableURI here...
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file wycinwyg
Looks like addBookmarkForTabBrowser and addBookmarkForBrowser need fixing.
Whiteboard: <CTho> NeilAway: i dont understand what causes bug 262267(11:55:36) thebot: CTho: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=262267 nor, --, ---, p_ch@verizon.net, NEW, wyciwyc added to bookmarked url <NeilAway> CTho: oh lxr for CreateExposeableURI
Reassigning as per Bug #32644
Assignee: p_ch → nobody
(this is Sanskrit to me.) Is this bug still valid?
Yes, it's easy to verify - load the attachment, wait three seconds (the text will change from "waiting" to "rewritten") then open the file bookmark dialog.
(In reply to comment #8)
> Yes, it's easy to verify - load the attachment, wait three seconds (the text
> will change from "waiting" to "rewritten") then open the file bookmark dialog.
> 

... and the URL line shows as "wyciwyg://0/https://bugzilla.mozilla.org/attachment.cgi?id=197606" (without the quotes). Hm, looks weird.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.2pre) Gecko/2008071301 SeaMonkey/2.0a1pre
CTho abused the whiteboard. Moving whiteboard comment here:

<CTho> NeilAway: i dont understand what causes bug 262267(11:55:36)
thebot: CTho: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=262267 nor, --, ---, p_ch@verizon.net, NEW, wyciwyc added to bookmarked url 
<NeilAway> CTho: oh, lxr for CreateExposeableURI
Whiteboard: <CTho> NeilAway: i dont understand what causes bug 262267(11:55:36) thebot: CTho: Bug https://bugzilla.mozilla.org/show_bug.cgi?id=262267 nor, --, ---, p_ch@verizon.net, NEW, wyciwyc added to bookmarked url <NeilAway> CTho: oh lxr for CreateExposeableURI
Still present on provided file
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1
Build identifier: 20120921003032
Whiteboard: [2012 Fall Equinox]
Out of interest, does Firefox have this bug? If not and we can find out where they fixed it, we may be able to turn this into a mentored porting bug.
Same problem present in today Firefox nightly
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: