Closed Bug 90550 Opened 24 years ago Closed 23 years ago

Need to rewrite URLs for publishing and for save as

Categories

(SeaMonkey :: Composer, defect, P3)

defect

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.
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
need this for the publishing solution
Priority: -- → P3
Target Milestone: --- → mozilla1.0
Status: NEW → ASSIGNED
Blocks: 98550
spam composer change
Component: Editor: Core → Editor: Composer
No longer blocks: 98550
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
I think we can resolve this bug since we now do this for saving (with some bugs of course) in nsWebBrowserPersist.
Great -- doing so.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.