diff --git a/src/langchange.php b/src/langchange.php new file mode 100644 index 0000000..91ee9fc --- /dev/null +++ b/src/langchange.php @@ -0,0 +1,10 @@ + diff --git a/www/index.php b/www/index.php index 388a3db..78d734c 100644 --- a/www/index.php +++ b/www/index.php @@ -1,13 +1,5 @@ 0, 'err' => LOC_ERROR_HOZON_NI_SIPPAI]; } @@ -51,9 +43,13 @@ function striptags (string $text): string { $text = preg_replace('/\/', '', $text); + $text = preg_replace('/\/', '', $text); + $text = preg_replace('/\.css\?/', '.css@', $text); + //$text = preg_replace('/'.parse_url($_POST['hozonsite'])['scheme'].'\:\/\/(.*)'.parse_url($_POST['hozonsite'])['host'].'/', '', $text); $text = preg_replace('/visibility: hidden/', '', $text); $text = preg_replace('/\
[\s\S]+?\<\/div\>/', '', $text); $text = preg_replace('/\
[\s\S]+?\<\/div\>/', '', $text); + $text = preg_replace('/(https\:\/\/)(.*)\//', '/', $text); $allowed = [ '!doctype', @@ -87,7 +83,7 @@ $file = striptags($file); // 危険なタグの削除 // ヘッダーの追加 - $file = "
".SITE_NAME_JA."でアーカイブしました。Archived with ".SITE_NAME_EN.".
トップページへ To toppage
".$file.'
'; + $file = "
".SITE_NAME_JA."でアーカイブしました。Archived with ".SITE_NAME_EN.".
トップページへ To toppage
".$file.'
'; // 保存 file_put_contents(urldecode($path), $file);