Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/init.php
blob: 993723ef4c1c68112a3164a73fac2ef1b11d6642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
define("BASE", __DIR__);

$old = '';
while ($old != $_SERVER['QUERY_STRING']) {
  $old = $_SERVER['QUERY_STRING'];
  $_SERVER['QUERY_STRING'] = urldecode($_SERVER['QUERY_STRING']);
}
$_SERVER['QUERY_STRING'] =
  str_replace('&amp;', '&',
    htmlspecialchars($_SERVER['QUERY_STRING'])
  );

$old = '';
while ($old != $_SERVER['REQUEST_URI']) {
  $old = $_SERVER['REQUEST_URI'];
  $_SERVER['REQUEST_URI'] = urldecode($_SERVER['REQUEST_URI']);
}
$_SERVER['REQUEST_URI'] =
  str_replace('&amp;', '&',
    htmlspecialchars($_SERVER['REQUEST_URI'])
  );

foreach ($_GET as $key => $val) {
  $old = '';
  while ($old != $_GET[$key]) {
    $old = $_GET[$key];
    $_GET[$key] = urldecode($_GET[$key]);
  }
  $_GET[$key] = htmlspecialchars($_GET[$key]);
}