This fix is for both the upload image dialog and the browser module of FCKeditor

The problem is that emails need images to be referenced bu abosulte (not relative) URLs otherwise the client application doesn’t know which domain the image is to be found in. You can manually add the domain name to the fron tof the image scr tag but if you forget, the email will appear with nasty red crosses in it instead of beautiful images.

the file to change is in FCKeditor/editor/dialog/fck_image/fck_image.js

the function is SetUrl about line 849. Fist we declare a new variable to hold the domain name which we later use. Both changes are marked in red. This work is not mine, I’m merely referencing it here for my own purposes.

var theDomain = ‘http://’ + location.hostname;

function SetUrl( url, width, height, alt )

{

if ( sActualBrowser == ‘Link’ )

{

GetE(‘txtLnkUrl’).value = url ;

UpdatePreview() ;

}

else

{

//change from this GetE(‘txtUrl’).value = url ; to the following
GetE(‘txtUrl’).value = theDomain + url ;

GetE(‘txtWidth’).value = width ? width : ” ;

GetE(‘txtHeight’).value = height ? height : ” ;

if ( alt )

GetE(‘txtAlt’).value = alt;

UpdatePreview() ;

UpdateOriginal( true ) ;

}