- fix: Linking Pages

This commit is contained in:
JT Smith 2007-03-08 00:29:24 +00:00
parent 0764ae4001
commit a2cf1ce813
2 changed files with 7 additions and 4 deletions

View file

@ -3,14 +3,16 @@
function tinyMCE_WebGUI_URLConvertor(url, node, on_save) {
url = tinyMCE.convertURL(url, node, on_save);
// Do custom WebGUI convertion, replace back ^();
// turn escaped macro characters back into the real thing
url = url.replace(new RegExp("%5E", "g"), "^");
url = url.replace(new RegExp("%3B", "g"), ";");
url = url.replace(new RegExp("%28", "g"), "(");
url = url.replace(new RegExp("%29", "g"), ")");
url = url.replace(/^\/\^/,"^");
url = url.replace(/http:\/\/\//,"/");
url = url.replace(/^.*(\^\/\;.*)$/,"$1");
url = url.replace(/^.*(\^FileUrl\(.*\)\;.*)$/,"$1");
// if there is a macro in the line, remove everythiing in front of the macro
url = url.replace(/^.*(\^.*)$/,"$1");
return url;
}