Skip to content

Commit

Permalink
[Customize] Links are replaced for constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Lepe committed Nov 30, 2019
1 parent 69e2197 commit 5e8d16d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions save.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 5e8d16d

Please sign in to comment.