Closed
Bug 90550
Opened 23 years ago
Closed 23 years ago
Need to rewrite URLs for publishing and for save as
Categories
(SeaMonkey :: Composer, defect, P3)
SeaMonkey
Composer
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0.1
People
(Reporter: akkzilla, Assigned: akkzilla)
References
Details
For publishing, we need to go through the document and rewrite URLs to be local
when possible. (This is related to bug 32768, Keep pasted links relative within
same document, but that bug involves paste-specific issues, whereas this bug is
more general and more oriented toward publishing issues.)
The API will need to take the base URL where the files will end up, and rewrite
any absolute URL which includes that base to be relative instead.
There are two basic approaches:
1. Modify the urls in the document.
2. Leave the document unchanged, and modify only on output.
An advantage of 1: it only needs to be done once, and editor code lives in the
editor where it belongs, vs. needing a new mode in the serializer.
An advantage of 2:
Modifying the document to make urls local means that all the images and other
refs also have to have local copies. 4.x was infuriating in its insistence on
copying a bazillion images around every time a document was modified. Not only
does this take time on a slow network link, but it changes the last-modified
date of a lot of files which haven't actually changed.
Personally, I'd like to see us make image-copying optional (of course, many
users will want it, so we should offer it, just not make it mandatory), and
therefore the url rewriting should happen at output time and not modify the
current document.
Opening the floodgates for discussion.
Comment 1•23 years ago
|
||
I think this is needed for saving files locally as well (when using save as).
By the way, Akkana meant "rewrite URLS to be relative" (rather than local) in her initial comments above.
This feature should fix (make relative) urls for links, images, JavaScript references, external CSS references, etc.
See this related bug: bug 36419
This may also block bug 40873 but I won't add that dependency right now.
The editor preference this should correspond to (if I recall correctly) is:
editor.publish_keep_links (defaults to true)
editor.publish_keep_images (also defaults to true) is for bug #36419 (whether to save the images to the new location or not)..
Blocks: 28792
Summary: Need to rewrite URLs for publishing → Need to rewrite URLs for publishing and for save as
Comment 2•23 years ago
|
||
need this for the publishing solution
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 4•23 years ago
|
||
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1
(you can query for this string to delete spam or retrieve the list of bugs I've
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1
Comment 5•23 years ago
|
||
I think we can resolve this bug since we now do this for saving (with some bugs
of course) in nsWebBrowserPersist.
Assignee | ||
Comment 6•23 years ago
|
||
Great -- doing so.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•