X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=lib%2Fhtml.php;h=3ba8c3fc4c1486aa2d277eb27399464dc1be5557;hb=83a95d80e0fc3d8bdccf79fb1106a04903685090;hp=d07ca9c1ceaa19698969d3824626a04202ee8d06;hpb=694d5a8d60cd0cfe5b892e19a1bca7bb55797700;p=pukiwiki%2Fpukiwiki.git
diff --git a/lib/html.php b/lib/html.php
index d07ca9c..3ba8c3f 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,49 +168,179 @@ 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)
+ );
+ $h_props = htmlsc_json($props);
+ $site_props = <<