X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=plugin%2Fruby.inc.php;h=a312a14a0d3e13d7615aecf82695d70cfb62f4bc;hb=3683001ed512fe6e109d36b4a1230f9ebceaa6a2;hp=05136c09b38091b52337a61d29e593d9af03633f;hpb=ccbf465e843aa3ead224e2b6b11ab5f23acaf8dc;p=pukiwiki%2Fpukiwiki.git diff --git a/plugin/ruby.inc.php b/plugin/ruby.inc.php index 05136c0..a312a14 100644 --- a/plugin/ruby.inc.php +++ b/plugin/ruby.inc.php @@ -1,25 +1,29 @@ $body($ruby)"; + if (func_num_args() != 2) return PLUGIN_RUBY_USAGE; + + list($ruby, $body) = func_get_args(); + + // strip_htmltag() is just for avoiding AutoLink insertion + $body = strip_htmltag($body); + + if ($ruby == '' || $body == '') return PLUGIN_RUBY_USAGE; + + return '' . $body . '' . '(' . + '' . htmlspecialchars($ruby) . '' . ')' . + ''; } ?>