Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2006)
+++ branches/2.8.x/CHANGELOG	(revision 2007)
@@ -11,7 +11,8 @@
 ! = Update/Change
 ===============================================================================
 
-
+23 Nov-2013 Build 2007 Manuela v.d.Decken(DarkViper)
+! modules/wysiwyg  made completely independend from hardcoded internal URLs
 19 Nov-2013 Build 2006 Dietmar Woellbrink (Luisehahne)
 !implemented temporary solution for IE11 compatibility
 14 Nov-2013 Build 2005 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2006)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2007)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.3');
-if(!defined('REVISION')) define('REVISION', '2006');
+if(!defined('REVISION')) define('REVISION', '2007');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/framework/class.wb.php
===================================================================
--- branches/2.8.x/wb/framework/class.wb.php	(revision 2006)
+++ branches/2.8.x/wb/framework/class.wb.php	(revision 2007)
@@ -755,8 +755,11 @@
 		}
 		if(is_string($sContent)) {
 			$sMediaUrl = WB_URL.MEDIA_DIRECTORY;
-			$searchfor = '@(<[^>]*=\s*")('.preg_quote($sMediaUrl).')([^">]*".*>)@siU';
-			$sContent = preg_replace($searchfor, '$1{SYSVAR:MEDIA_REL}$3', $sContent );
+			$aSearchfor = array('@(<[^>]*=\s*")('.preg_quote($sMediaUrl).')([^">]*".*>)@siU',
+			                    '@(<[^>]*=\s*")('.preg_quote(WB_URL).')([^">]*".*>)@siU');
+			$aReplacements = array('$1{SYSVAR:MEDIA_REL}$3',
+			                       '$1{SYSVAR:WB_REL}$3');
+			$sContent = preg_replace($aSearchfor, $aReplacements, $sContent );
 		}
 		return $sContent;
 	}
Index: branches/2.8.x/wb/modules/wysiwyg/view.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 2006)
+++ branches/2.8.x/wb/modules/wysiwyg/view.php	(revision 2007)
@@ -25,7 +25,8 @@
 // Get content 
 $content = '';
 $sql = 'SELECT `content` FROM `'.TABLE_PREFIX.'mod_wysiwyg` WHERE `section_id`='.(int)$section_id;
-if( ($content = $database->get_one($sql)) ) {
+if(($content = $database->get_one($sql))) {
 	$content = str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content );
+	$content = str_replace('{SYSVAR:WB_REL}', WB_URL, $content );
 }
 echo $content;
Index: branches/2.8.x/wb/modules/wysiwyg/modify.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/modify.php	(revision 2006)
+++ branches/2.8.x/wb/modules/wysiwyg/modify.php	(revision 2007)
@@ -26,8 +26,9 @@
 $sMediaUrl = WB_URL.MEDIA_DIRECTORY;
 // Get page content
 $sql = 'SELECT `content` FROM `'.TABLE_PREFIX.'mod_wysiwyg` WHERE `section_id`='.(int)$section_id;
-if ( ($content = $database->get_one($sql)) !== null  ) {
- $content = htmlspecialchars(str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content));
+if (($content = $database->get_one($sql)) !== null) {
+	$content = str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content);
+	$content = htmlspecialchars(str_replace('{SYSVAR:WB_REL}', WB_URL, $content));
 } else {
  $content = 'There is an relation error in the database.';
  $sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_wysiwyg` SET '
Index: branches/2.8.x/wb/modules/wysiwyg/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(revision 2006)
+++ branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(revision 2007)
@@ -84,7 +84,7 @@
 			} else {
 				$msg[] = 'Field ( `content` ) description has been changed successfully'." $OK";
 			}
-// change internal absolute links into relative links
+// change internal absolute Media links into relative links
 			$sTable = $database->TablePrefix.'mod_wysiwyg';
 			$sql  = 'UPDATE `'.$sTable.'` ';
 			$sql .= 'SET `content` = REPLACE(`content`, \'"'.WB_URL.MEDIA_DIRECTORY.'\', \'"{SYSVAR:MEDIA_REL}\')';
@@ -91,6 +91,15 @@
 			if (!$database->query($sql)) {
 				$msg[] = ''.$database->get_error();
 			} else {
+				$msg[] = 'Change internal absolute Media links into relative links'." $OK";
+			}
+// change all other internal absolute links into relative links
+			$sTable = $database->TablePrefix.'mod_wysiwyg';
+			$sql  = 'UPDATE `'.$sTable.'` ';
+			$sql .= 'SET `content` = REPLACE(`content`, \'"'.WB_URL.'\', \'"{SYSVAR:WB_REL}\')';
+			if (!$database->query($sql)) {
+				$msg[] = ''.$database->get_error();
+			} else {
 				$msg[] = 'Change internal absolute links into relative links'." $OK";
 			}
 // only for $callingScript upgrade-script.php
