summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2010-02-19 11:20:54 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2010-02-19 11:23:36 +0100
commit00ed153bee1758c80db5ca440c67db2c1ab4d171 (patch)
treec007f4df49bd7c7b1c1e1c73792c5f1a1c5f14b9
parent10a9b20a5eecf6b932716cb4250a5a53214519b4 (diff)
downloadrafb-nopaste-00ed153bee1758c80db5ca440c67db2c1ab4d171.tar.gz
rafb-nopaste-00ed153bee1758c80db5ca440c67db2c1ab4d171.tar.xz
rafb-nopaste-00ed153bee1758c80db5ca440c67db2c1ab4d171.zip
fixed unicode issues
-rw-r--r--paste/get.php4
-rw-r--r--paste/include/pastify.inc1
-rw-r--r--paste/index.html4
-rw-r--r--paste/paste.php2
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