OSDN Git Service

BugTrack2/65: strip_htmltag() is just for avoiding AutoLink insertion
authorhenoheno <henoheno>
Sat, 7 May 2005 07:41:31 +0000 (16:41 +0900)
committerhenoheno <henoheno>
Sat, 7 May 2005 07:41:31 +0000 (16:41 +0900)
plugin/color.inc.php
plugin/edit.inc.php
plugin/ruby.inc.php

index dbe8934..5c2daa4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: color.inc.php,v 1.20 2005/01/08 04:13:19 henoheno Exp $
+// $Id: color.inc.php,v 1.21 2005/05/07 07:36:35 henoheno Exp $
 //
 // Text color plugin
 
@@ -11,12 +11,14 @@ define('PLUGIN_COLOR_ALLOW_CSS', TRUE); // TRUE, FALSE
 // ----
 define('PLUGIN_COLOR_USAGE', '&color(foreground[,background]){text};');
 define('PLUGIN_COLOR_REGEX', '/^(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z-]+)$/i');
+
 function plugin_color_inline()
 {
        global $pkwk_dtd;
 
        $args = func_get_args();
-       $text = array_pop($args); // htmlspecialchars(text)
+       $text = strip_htmltag(array_pop($args)); // htmlspecialchars(text)
+               // strip_htmltag() is just for avoiding AutoLink insertion
 
        list($color, $bgcolor) = array_pad($args, 2, '');
        if ($color != '' && $bgcolor != '' && $text == '') {
index 7d385b6..90aeb6e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: edit.inc.php,v 1.33 2005/03/13 17:29:02 teanan Exp $
+// $Id: edit.inc.php,v 1.34 2005/05/07 07:37:32 henoheno Exp $
 //
 // Edit plugin
 // cmd=edit
@@ -87,7 +87,8 @@ function plugin_edit_inline()
 
        // Arguments
        $args = func_get_args();
-       $s_label = array_pop($args); // {label}
+       $s_label = strip_htmltag(array_pop($args)); // {label}
+               // strip_htmltag() is just for avoiding AutoLink insertion
        $page    = array_shift($args);
        if($page == NULL) $page = '';
        $_noicon = $_nolabel = FALSE;
index 36d25ad..a312a14 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 // PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: ruby.inc.php,v 1.5 2005/01/04 14:25:24 henoheno Exp $
+// $Id: ruby.inc.php,v 1.6 2005/05/07 07:41:31 henoheno Exp $
 //
 // Ruby annotation plugin: Add a pronounciation into kanji-word or acronym(s)
 // See also about ruby: http://www.w3.org/TR/ruby/
@@ -16,6 +16,10 @@ function plugin_ruby_inline()
        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 '<ruby><rb>' . $body . '</rb>' . '<rp>(</rp>' .