-//
-function REWRITE_LINKS ($HTML) {
- // Skip rewriting for the admin area (which search engine may enter here???)
- if (ereg($GLOBALS['module'], getConfig('rewrite_skip'))) return $HTML;
-
- // Strip slashes with double-backslashes for the preg_replace() function
- $URL = str_replace("/", "\\/", constant('URL'));
+// Rewrite links in HTML for better SEO (ugly part of mx!)
+function rewriteLinksInCode ($code) {
+ // Skip rewriting for configured or empty modules
+ if ((getModule() == '') || (isInStringIgnoreCase(getModule(), getConfig('rewrite_skip')) !== false)) {
+ return $code;
+ } // END - if