I've found a few problems when using the WYSIWYG HTMLArea control.
(My serendipity installation is in a subdirectory called 'serendipity' off my root)
If you enter a relative url in an <a> tag or <img> tag then a '/' is appended when you save it. If you enter a tag starting with 'serendipity'it is removed. e.g.:
<a href="uploads/test.jpg"> becomes <a href="/uploads/test.jpg">
<a href="/serendipity/uploads/test.jpg> becomes <a href="/uploads/test.jpg">
This means that adding images using the image browser results in a broken link.
My paths are set up correctly I think as everything else works ok (image upload, image management etc.)
Is the problem with my installation, HTMLArea, or S9Y?
Robin
HTMLArea is re-writing urls
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: HTMLArea is re-writing urls
Please tell the version of s9y you're using.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Posts: 4
- Joined: Fri May 28, 2004 9:22 pm
Serendipity 0.6-pl2
Serendipity 0.6-pl2
I downloaded it last Friday
I downloaded it last Friday
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Serendipity 0.6-pl2
Hm, okay. I guess you are using Internet Explorer? Because in Mozilla, it doesn't seem to be the case.RobinSummerhill wrote:Serendipity 0.6-pl2
I downloaded it last Friday
I remember once having corrected an issue with it, which caused some other troubles. I'll try to somehow find the time to correct this, but my schedule is a bit tight at the moment, so please stay tuned.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Posts: 4
- Joined: Fri May 28, 2004 9:22 pm
Re: Serendipity 0.6-pl2
You're right. I've tried it with Netscape 7.1 and it works ok. Unfortunately the person I'm setting this up for uses Internet Explorer.garvinhicking wrote: Hm, okay. I guess you are using Internet Explorer? Because in Mozilla, it doesn't seem to be the case.
Robin
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Serendipity 0.6-pl2
Hi Robin!
I just updated s9y's CVS with this new code; search for it in your htmlarea/htmlarea.js file and use this function instead:
At least it works with all the variants I tried. It will now always convert a relative link to an absolute one, but this should make no problem. And the benefit is, that it finally works.
Regards,
Garvin.
I just updated s9y's CVS with this new code; search for it in your htmlarea/htmlarea.js file and use this function instead:
Code: Select all
HTMLArea.prototype.stripBaseURL = function(string) {
var baseurl = this.config.baseURL;
// strip to last directory in case baseurl points to a file
baseurl = baseurl.replace(/[^\/]+$/, '');
_baseurl = baseurl;
var basere = new RegExp(baseurl);
string = string.replace(basere, this.config.baseURL);
// strip host-part of URL which is added by MSIE to links relative to s
baseurl = baseurl.replace(/^(https?:\/\/[^\/]+)(.*)$/, '$1');
basere = new RegExp(baseurl);
return string.replace(basere, baseurl);
};
Regards,
Garvin.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/