X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=lib%2Fhtml.php;h=41d53e9b158e3a13ebe4bec4ddc2d77ed7c59c07;hb=dcc6b19cb04618da87a41965a10db2f48b37c25e;hp=c5047d70c8d2e82fb03ac149d4b0b8a2abf10fd6;hpb=c459fd30e7be09e69c7a57d7bbf011502ec2cdc8;p=pukiwiki%2Fpukiwiki.git
diff --git a/lib/html.php b/lib/html.php
index c5047d7..41d53e9 100644
--- a/lib/html.php
+++ b/lib/html.php
@@ -1,8 +1,8 @@
; rel=\"canonical\"");
+ }
+
// Search words
if ($search_word_color && isset($vars['word'])) {
- $body = '
' . $_msg_word . htmlspecialchars($vars['word']) .
+ $body = '
' . $_msg_word . htmlsc($vars['word']) .
'
' . $hr . "\n" . $body;
// BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
@@ -131,47 +166,128 @@ function catbody($title, $page, $body)
arsort($keys, SORT_NUMERIC);
$keys = get_search_words(array_keys($keys), TRUE);
$id = 0;
+ $patterns = '';
foreach ($keys as $key=>$pattern) {
- $s_key = htmlspecialchars($key);
- $pattern = '/' .
+ if (strlen($patterns) > 0) {
+ $patterns .= '|';
+ }
+ $patterns .= '(' . $pattern . ')';
+ }
+ if ($pattern) {
+ $whole_pattern = '/' .
'
+EOS;
+ return $empty_data;
+ }
+ // Site basic Properties
+ $props = array(
+ 'is_utf8' => $is_utf8,
+ 'json_enabled' => $json_enabled,
+ 'base_uri_pathname' => get_base_uri(PKWK_URI_ROOT),
+ 'base_uri_absolute' => get_base_uri(PKWK_URI_ABSOLUTE)
+ );
+ $props_json = htmlsc(json_encode($props, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
+ $site_props = <<