Opened 14 years ago
Closed 12 years ago
#8022 closed Bug (wontfix)
Paste of relative path image with baseHref set results in wrong urls in IE
Reported by: | Freddie Bingham | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.1 |
Keywords: | CantFix | Cc: |
Description (last modified by )
This doesn't ever seem to work in FF, but it does in IE with baseHref is not defined.
- Set config.baseHref
- Visit a website that images set via relative urls, e.g. <img src="../somethingimage.png" />
- Right-click an image, select "Copy".
- Go to editor and paste image.
- Observe that image is broken and inspection of the image shows that the img src now includes the baseHref that was set with config.baseHref.
Make the same action with baseHref not set and the image displays as it contains the full url to the image from which it was copied. Even though the source image contained a relative path, the paste action results in the full URL being used unless baseHref is set.
According comment_5 this is a won't fix and can't fix
Attachments (1)
Change History (8)
comment:1 Changed 14 years ago by
Status: | new → confirmed |
---|---|
Version: | → 3.1 |
comment:2 Changed 14 years ago by
"The base href URL used to resolve relative and absolute URLs in the editor content."
You seem to imply that the correct behavior here would be for all browsers to behave as IE is behaving.
The baseHref setting should not apply in this context. When there is no baseHref, the full foreign url is used but when there is a baseHref set, that url is thrown away and we use baseHref, breaking the image? The code is doing this per design?
comment:4 Changed 14 years ago by
If nothing is known about a relative URL, then yes, of course, base href should be used, if set. If the full URL is known, which IE seems to know in this case, then the full URL should be used. There is no benefit to replacing it with the base href in this context. I asked if this decision was being made by CKEditor or if it was being done by IE.
Changed 12 years ago by
Attachment: | template_test.html added |
---|
comment:5 Changed 12 years ago by
- Open template test in IE browser.
- Go to http://refcardz.dzone.com/refcardz/getting-started-java-gui and copy author image with CRTL+C
- Paste it into editable section with CRTL+V - Image got pasted
- Uncomment base tag in template and reload the page
- Try to copy/paste image once more - Image is not pasted because URL is broken
Looks like IE is breaking the URL.
comment:6 Changed 12 years ago by
Description: | modified (diff) |
---|
comment:7 Changed 12 years ago by
Keywords: | CantFix added |
---|---|
Resolution: | → wontfix |
Status: | confirmed → closed |
Taking comment_5 into account I;m closing this ticket as it can't be fixed.
Editor receives post processed data and there is no way to figure out correct URL.
According to http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.baseHref this attribute means: "The base href URL used to resolve relative and absolute URLs in the editor content."
The browser behavior is inconsistent with this description.