77;20202;0ccatbody - よくきたWiki

Loading ...


http://www.example.com/pukiwiki/?cmd=read&page=

*1

ABC%2F%A4%A2%A4%A4%A4%A6%A4%A8%A4%AA%2FDEF

*3

function myrawurlencode( $page) {
    $page = rawurlencode( $page);
        $replace_db = array( "%2F"=>"/", "%3A"=>":");
        return str_replace( array_keys( $replace_db), array_values( $replace_db), $page);
}

*4

$ grep -lir 'rawurlencode(' .

*6

lib/func.php
lib/html.php
lib/make_link.php
plugin/ls2.inc.php
plugin/recent.inc.php
plugin/related.inc.php
plugin/rss.inc.php

index.php

$path_info = isset( $_SERVER[ "PATH_INFO"])? ltrim( $_SERVER[ "PATH_INFO"], "/"): "";
if ( $path_info != "") {
  $_GET[ "cmd"] = "read";
  $_GET[ "page"] = $path_info;
  define( "PKWK_URL", substr( $_SERVER[ "PHP_SELF"], 0, - strlen( $_SERVER[ "PATH_INFO"])));
  define( "PKWK_PHP_SELF", substr( $_SERVER[ "PHP_SELF"], 0, - strlen( $_SERVER[ "PATH_INFO"])));
}
define('PKWK_DIR', '/home/webmaster/contents/pukiwiki/');
define('DATA_HOME', PKWK_DIR.'data/');
define('LIB_DIR',   PKWK_DIR.'lib/');

lib/html.php

    $r_page = rawurlencode($_page);

    // Set $_LINK for skin
    $_LINK['add']      = "$script?cmd=add&page=$r_page";
    $_LINK['backup']   = "$script?cmd=backup&page=$r_page";
    $_LINK['copy']     = "$script?plugin=template&refer=$r_page";
    $_LINK['diff']     = "$script?cmd=diff&page=$r_page";
    $_LINK['edit']     = "$script?cmd=edit&page=$r_page";
    $_LINK['filelist'] = "$script?cmd=filelist";
    $_LINK['freeze']   = "$script?cmd=freeze&page=$r_page";

    $_LINK['list']     = "$script?cmd=list";
    $_LINK['new']      = "$script?plugin=newpage&refer=$r_page";
    $_LINK['rdf']      = "$script?cmd=rss&ver=1.0";

    $_LINK['refer']    = "$script?plugin=referer&page=$r_page";

    $_LINK['rename']   = "$script?plugin=rename&refer=$r_page";
    $_LINK['rss']      = "$script?cmd=rss";
    $_LINK['rss10']    = "$script?cmd=rss&ver=1.0"; // Same as 'rdf'
    $_LINK['rss20']    = "$script?cmd=rss&ver=2.0";
    $_LINK['search']   = "$script?cmd=search";

lib/makelink.php


        // Footnote
        $foot_explain[$id] = 'aaa<a id="notefoot_' . $id . '" href="' .

            '" class="note_super">*' . $id . '</a>' . "\n" .
            '<span class="small">' . $note . '</span><br />';

        // A hyperlink, content-body to footnote
    $r_refer = ($refer == '') ? '' : '&amp;refer=' . rawurlencode($refer);

    if (! isset($related[$page]) && $page != $vars['page'] && is_page($page))
        $related[$page] = get_filetime($page);

    if (is_page($page)) {
        // Hyperlinks
        $passage = get_pg_passage($page, FALSE);
        $title   = $link_compact ? '' : ' title="' . $s_page . $passage . '"';

            $s_alias . '</a>';

plugin/ls2.inc.php

    $s_page = htmlspecialchars($page);    $title  = $s_page . ' ' . get_pg_passage($page, FALSE);

plugin/recent.inc.php

        $s_page = htmlspecialchars($page);


        $pg_passage = get_pg_passage($page, FALSE);

plugin/rss.inc.php

    $page_title_utf8 = mb_convert_encoding($page_title, 'UTF-8', SOURCE_ENCODING);


    // Creating <item>
        list($time, $page) = explode("\t", rtrim($line));

        $title  = mb_convert_encoding($page, 'UTF-8', SOURCE_ENCODING);
 <title>$title</title>

$date


            $date = substr_replace(get_date('Y-m-d\TH:i:sO', $time), ':', -2, 0);
                $tb_id = md5($r_page);

                    '?tb_id=' . $tb_id . '</trackback:ping>';
 <title>$title</title>

 <dc:date>$date</dc:date>
  <title>$page_title_utf8</title>
  <link>$self$r_whatsnew</link>
  <description>PukiWiki RecentChanges</description>
  <title>$page_title_utf8</title>



*1 http://php.net/rawurlencode
*2
*3
*4
*5
*6
リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS
最終修正日時: Mon, 23 Jan 2006 14:07:16 JST (5753d)
文字数(HTML): 4568
文字数(Wiki): 8057
人気ブログランキング - よくきた wiki