diff --git a/conf/conf.php b/conf/conf.php index 5945c53..96fd089 100644 --- a/conf/conf.php +++ b/conf/conf.php @@ -31,9 +31,9 @@ function changeEveryNSec ($n, $a) { } $taglines = [ - 'Votre caverne remplie des trésors que vous avez découverts sur le web.', - 'Votre forteresse de contenu imprenable>', - 'Votre palais informationnel.' + 'Votre caverne remplie des trésors que vous avez découverts sur le web', + 'Votre forteresse de contenu imprenable', + 'Votre palais informationnel' ]; define('USP', changeEveryNSec(2, $taglines)); diff --git a/inc/header.php b/inc/header.php index cdbe620..97d5c77 100644 --- a/inc/header.php +++ b/inc/header.php @@ -18,13 +18,16 @@
- - - + if (!isset($_POST['youtube_url'])) { + + $out = ''; + $placeholder = 'https://www.youtube.com/watch?v=ASywAfBAVrQ'; + + } else { + + $out = '

Votre vidéo est en cours de téléchargement…

@@ -32,14 +35,21 @@ $.ajax({ method: "POST", url: "youtube_add_video_aux.php", - data: { youtube_url: "" } + data: { youtube_url: "'. $_POST['youtube_url'] .'" } }) .done(function( response ) { console.log(response); }); - - '; + + $placeholder = htmlspecialchars($_POST['youtube_url']); + } + ?> + + + +
diff --git a/youtube_watch.php b/youtube_watch.php index 0ce03b1..f3c3267 100644 --- a/youtube_watch.php +++ b/youtube_watch.php @@ -12,8 +12,8 @@ function astroport_urlencode ($str) { $videoURI = urldecode($_GET['uri']); list($a, $ipfsPath, $videoIPFS_ID, $videoFileName) = explode('/', $videoURI); $videoURL = 'http://'. HOST. '/' . urlencode($ipfsPath) . '/' . urlencode($videoIPFS_ID) . '/' . astroport_urlencode($videoFileName); -$videoName = htmlentities(urldecode($_GET['name'])); -$videoMIME = htmlentities($_GET['mime']); +$videoName = htmlspecialchars(urldecode($_GET['name'])); +$videoMIME = htmlspecialchars($_GET['mime']); include('inc/header.php');