href="http://moodle.org/mod/glossary/...."
into this window, it will get converted into
href="../glossary/..."
This happens right after the paste operation. When I switch to source mode, I see the relative urls in the window. If I switch back to normal edit mode, copy the text from the window and paste into some other html editor (e.g. Mozilla Composer), the urls get restored back to absolute form.
This behavior doesn't happen when using other browsers, e.g. Internet Explorer or the original Mozilla browser. The Firefox behavior causes significant problems, when posts are emailed out. Not only are the relative links in the email dysfunctional, but in our email servers they trigger antispam alerts which are inserted into the body of the email, making it unreadable. See the following discussion and bug tracker reference contained therein: http://moodle.org/mod/forum/discuss.php?d=22016
(Note: this link was inserted using the link tool, not via copy/paste.)
Janne, could you look into this and see if anything can be done about this?
Re: Absolute links being converted into relative ones
href="http://gmail.google.com/smail/excult.php"
into an outgoing email resulted in
href="../smail/excult.php"
appearing in the incoming mail, also triggering the spam alert from our mail server.
Re: Absolute links being converted into relative ones
I think this might be a problem for users who want to cut and paste into posts from, for example Word. Firefox just won't let you do that (unless, of course, they toggle to html--but I don't want my users to have to mess with that). And, of course, even pasting into html doesn't solve the link problem.
So, anybody have any new thoughts about getting around the cut and paste issues in Firefox?
Re: Absolute links being converted into relative ones
Anyway, I think the best thing would be to complain to the firefox folks; this setting should be like pop-ups, active-x, etc. "allow script to copy and paste from this site"--No/Ok.
Pretty ridiculous that they expect users to hack around in config files to 'fix' this, IMO.
Re: Absolute links being converted into relative ones
Re: Absolute links being converted into relative ones
skodak
But this topic is being hijacked, since the issue Zig is talking about is about what Firefox does to the pasted text. See bug 2953 ...
Re: Absolute links being converted into relative ones
http://moodle.org/mod/forum/discuss.php?d=22013
is an example of this bug which brought this issue to my attention. If you look at the post, you will find all the autolink urls have been converted to relative links and the links in the resulting email are dysfunctional. Petr must have editted his original post in Firefox, and in the process copied and pasted.
I have posted a bug on this at bugzilla.moodle.org: https://bugzilla.mozilla.org/show_bug.cgi?id=290740
and also posted to the Firefox support discussion board:
http://forums.mozillazine.org/viewtopic.php?p=1395170
Re: Absolute links being converted into relative ones
Back to relative links: I have looked in TinyMCE source code and they have a hack to convert all relative links into absolute, IMHO we could do the same. It seems it is a Firefox feature, not a bug
Re: Absolute links being converted into relative ones
While this may be useful in many circumstances, one can easily imagine circumstances where this is not what one wants. Surely one would want some way of turning off this behavior.
Re: Absolute links being converted into relative ones
Have you had a look through your configuration in Firefox (go to URL about:config manually) for any likely variables? I couldn't see any ...
Re: Absolute links being converted into relative ones
Re: Absolute links being converted into relative ones
//value = a.nodeValue;
value = root[a.nodeName];
Now it seems, that the absolute links stay absolute, but I wonder what else was broken...
skodak
Off topic: I have found interesting site with HTML Area fork Xinha, the source code contains patch to enable Ctrl-V without hacking user.js
Here's a discussion post at Mozilla about pasting URL's using Firefox, the guy was having a heck of a time getting Firefox support to understand the problem. Here is the last part of the post: "I would say that the problem happens not in the Paste operation, but during serialization, when the rich text field is turned into a stream of text before the message is sent." And the guy goes on to suggest posting a bug.
http://forums.mozillazine.org/viewtopic.php?t=252004&highlight=paste+editor
And if this helps, it isn't an "http" problem--it must have to do with href-- I once pasted an href with php code and it still cut it off?
Re: Absolute links being converted into relative ones
although it'll need testing
- Janne -
Re: Absolute links being converted into relative ones when pasting into HTML editor in FF in Moodle 1.9.6
FF 3.6.13 is still changing absolute links to a page within a Moodle site to relatively ones in Moodle 1.9.6 when text is pasted into a forum in that Moodle site.
This is VERY frustrating. So frustrating that I am changing my browser of choice to IE.
Peter Evans