diff options
-rw-r--r-- | paste/get.php | 4 | ||||
-rw-r--r-- | paste/include/pastify.inc | 1 | ||||
-rw-r--r-- | paste/index.html | 4 | ||||
-rw-r--r-- | paste/paste.php | 2 |
4 files changed, 7 insertions, 4 deletions
diff --git a/paste/get.php b/paste/get.php index 33d8aae..735822b 100644 --- a/paste/get.php +++ b/paste/get.php @@ -43,8 +43,10 @@ if (!is_subclass_of($config['storage'], 'StorageEngine')) die('Invalid config'); } -if (isset($_GET['p'])) +if (isset($_GET['p'])) { + header("Content-type: text/html; charset=utf-8"); die($config['storage']->getContent($_GET['p'])); +} header('Location: ' . $config['site_domain'] . $config['site_path']); ?> diff --git a/paste/include/pastify.inc b/paste/include/pastify.inc index 328c1bf..8103a7d 100644 --- a/paste/include/pastify.inc +++ b/paste/include/pastify.inc @@ -55,6 +55,7 @@ function PastifyText($text, $language, $desc, $get_url, $remove_url) <html> <head> <link rel="stylesheet" type="text/css" href="${config['site_path']}paste.css"/> +<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="robots" content="noarchive"/> <title>Pasted code - $desc</title> </head> diff --git a/paste/index.html b/paste/index.html index f6e480c..2b618ea 100644 --- a/paste/index.html +++ b/paste/index.html @@ -1,12 +1,12 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> - <head> <title>Paste your code</title> + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> </head> <body> - <form action="paste.php" method="post"> + <form action="paste.php" method="post" accept-charset="UTF-8"> <table border="0" cellpadding="0" cellspacing="1"> <tr> <td style="padding-left: 0px; padding-right: 5px;">Language:</td> diff --git a/paste/paste.php b/paste/paste.php index 3c7891e..6dba5c0 100644 --- a/paste/paste.php +++ b/paste/paste.php @@ -63,7 +63,7 @@ if (isset($_POST['text']) && "" != ($ttemp = rtrim($_POST['text']))) } else { - $language = 'Plain Text'; + $language = 'text'; } // Add a description if available |