diff --git a/save.php b/save.php index 2f8e428f..bb20e731 100644 --- a/save.php +++ b/save.php @@ -20,6 +20,10 @@ function sanitizeFileName($fileName) // Clear edition attributes: $html = preg_replace("/contenteditable=[\"|'][^'\"]*[\"|']/", "", $html); $html = preg_replace("/spellcheckker=[\"|'][^'\"]*[\"|']/", "", $html); +// Replace links +foreach($LINKS as $name => $link) { + $html = str_replace('"'.$link.'"', "LINKS.$name", $html); +} $fileName = sanitizeFileName($_POST['fileName']); $pageID = str_replace(".php","", basename($fileName));