Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Better fix for Issue #1551 (Local images with full URLs broken in Firefox 3.6) #1668

Closed
wants to merge 2 commits into from

Conversation

pauln
Copy link
Contributor

@pauln pauln commented May 19, 2011

Better fix for Issue #1551 (Local images with full URLs broken in Firefox 3.6)

Change replacement URL to use path.clean( path.origin ) instead of path.get( fileUrl ) so that generated URLs are not broken (basing them off fileUrl breaks them if the page being viewed is in a different directory to path.origin).

… broken in Firefox 3.6)

Change replacement URL to use path.clean( path.origin ) instead of path.get( fileUrl ) so that generated URLs are not broken (basing them off fileUrl breaks them if the page being viewed is in a different directory to path.origin).
@toddparker
Copy link
Contributor

Thanks for this. We're in the middle of merging in a a big nav change so we'll take a look at this in a few...

@pauln
Copy link
Contributor Author

pauln commented May 23, 2011

Great - I'll keep an eye on things.

@pauln
Copy link
Contributor Author

pauln commented May 31, 2011

I'm guessing that the big nav change has been merged in, given the "navigation" branch's disappearance. This issue still exists, but I see that there's some acknowledgment that something's amiss, in the form of the following comment:
// XXX_jblas: We need to fix this so that it removes the document
// base URL, and then prepends with the new page URL.

@scottjehl
Copy link

Any progress on this one, folks? :)

@pauln
Copy link
Contributor Author

pauln commented Jun 17, 2011

Earthquakes are currently keeping me away from work - I should be back on Monday, though, so if nobody else has sorted this out by then, I'll do some more testing on this issue and report back.

…erly. Includes a tweak to path.get() to append a trailing slash if not present.
@pauln
Copy link
Contributor Author

pauln commented Jun 20, 2011

I've reverted to using path.get( fileUrl ) and updated the stripping of the base path to use newPath rather than location.pathname. This ensures that both the removal and addition are using the same path, resulting in correct URLs being generated.

I also tweaked path.get() to add a trailing slash if there isn't one present, to make sure that relative URLs will still work if link to the current page (loaded by AJAX) omitted the trailing slash (the AJAX request will typically get redirected to add the slash, but there's no way for that the success function called by the $.ajax() call to know the final URL retrieved - so we need to manually add it, with path.get() seeming like a good place to do so).

@toddparker
Copy link
Contributor

Is this still open or should I close it?

@pauln
Copy link
Contributor Author

pauln commented Aug 8, 2011

There appear to have been pretty major changes in jquery.mobile.navigation.js since I last looked at this - I'll have to try to work out where my test case has gone (it's been a while) and see where it's now at.

@johnbender
Copy link
Contributor

@MaxThrax

I'm going to close this one, please re-open if it persists.

@johnbender johnbender closed this Aug 29, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants