Spaces and image links

Spaces and image links

by zack Belinson -
Number of replies: 0
Hi

We have experienced issues with importing html files (which were previously uploaded to the files area) which are using various images (located in the same directory as the html files).

The problem was that the folder containing the images was named "overlapping relationship" (has a space) and caused the new image link to look like:

src="../../file.php/6/learning_modules/overlapping+relationships/image002.gif" which broke the link to the image.


So first, does anyone experience this issue before?


We are using Moodle 1.96 with the latest version of the book module, using tinymce editor and testing with IE8, FF3 and Chrome.

We have managed to fix it by modifying lib.php (contained in book module code):


Line 320 was changed to:

$base = $coursebase.strtr(urlencode($rel), array("%2F" => "/","+" => "%20"));

(the highlighted bit was added).

Any thoughts?

Zack
Average of ratings: -