--- old/fckeditor.module	Mon Aug 28 19:02:44 2006
+++ fckeditor.module	Mon Aug 28 21:22:20 2006
@@ -187,7 +187,7 @@
     // nessecary because FCKeditor interferes with resize script
     $element['#resizable'] = FALSE;
 
-    drupal_add_js(preg_replace('/^\//', '', $base_path) . 'fckeditor.js');
+    drupal_add_js(preg_replace('/^'.str_replace('/','\/',base_path()).'/', '', $base_path) . 'fckeditor.js');
 
     if (user_access('use advanced fckeditor')) {
       $toolbar = variable_get("fckeditor_advanced_toolbar", 'DrupalFull');
@@ -200,14 +200,14 @@
 <script type=\"text/javascript\">
 var ".$js_id." = new FCKeditor( '".$element['#id']."' );
 ".$js_id.".BasePath	= '".$base_path."';
-".$js_id.".Config['CustomConfigurationsPath'] = '/".$module_path."/fckeditor.config.js';
+".$js_id.".Config['CustomConfigurationsPath'] = '".base_path().$module_path."/fckeditor.config.js';
 ".$js_id.".ToolbarSet = '".$toolbar."';
 </script>\n";
 
   	if (variable_get('fckeditor_popup', '0')) {
   		// Add the script file with the popup open function.
   		drupal_add_js($module_path . '/fckeditor.popup.js');
-  		$element['#title'] .= " <span class=\"fckeditor_popuplink\">(<a href=\"#\" onclick=\"FCKeditor_OpenPopup('/".$module_path."/fckeditor.popup.html?var=".$js_id."&el=".$element['#id']."');return false;\">" . t('Open rich editor') . "</a>)</span>" ;
+  		$element['#title'] .= " <span class=\"fckeditor_popuplink\">(<a href=\"#\" onclick=\"FCKeditor_OpenPopup('".base_path().$module_path."/fckeditor.popup.html?var=".$js_id."&el=".$element['#id']."');return false;\">" . t('Open rich editor') . "</a>)</span>" ;
   	} else {
       // if no popup mode, add the editor
    		$element['#suffix'] .="
@@ -256,8 +256,8 @@
 	$path = variable_get( 'fckeditor_base_path', false );
 	
 	if ( !$path ) {
-		return '/' . drupal_get_path('module', 'fckeditor') . '/fckeditor/';
+		return base_path() . drupal_get_path('module', 'fckeditor') . '/fckeditor/';
 	}
 	
 	return $path;
-}
\ No newline at end of file
+}
