diff -urN soojung-0.4.11/classes/Comment.class.php soojung/classes/Comment.class.php
--- soojung-0.4.11/classes/Comment.class.php	2005-06-06 15:00:30.000000000 +0900
+++ soojung/classes/Comment.class.php	2005-10-25 13:58:05.000000000 +0900
@@ -52,6 +52,9 @@
    * if $text is spam comment return true
    */ 
   function isSpam($text) {
+    if ($text == "") {
+      return false;
+    }
     global $spam_words;
     $text = br2nl($text);
 
@@ -78,7 +81,7 @@
       return;
     }
     
-    if (Comment::isSpam($body)) {
+    if (Comment::isSpam($body) || Comment::isSpam($name) || Comment::isSpam($homepage)) {
       return;
     }
 
diff -urN soojung-0.4.11/classes/Formatter.class.php soojung/classes/Formatter.class.php
--- soojung-0.4.11/classes/Formatter.class.php	2005-09-08 18:37:24.000000000 +0900
+++ soojung/classes/Formatter.class.php	2005-10-25 10:04:51.000000000 +0900
@@ -335,6 +335,7 @@
     # single bracketed rule [http://blah.blah.com Blah Blah]
     "(\[\^?($url):[^\s\]]+(\s[^\]]+)?\])|".
     # WikiName rule: WikiName ILoveYou (imported from the rule of NoSmoke)
+    "(\b|\^?)([A-Z][a-zA-Z]+):([^\(\)<>\s\']*[^\(\)<>\s\'\",\.:\?\!]*(\s(?![\x33-\x7e]))?)|".
     # protect WikiName rule !WikiName
     "(?<![a-z])\!?(?:((\.{1,2})?\/)?[A-Z]([A-Z]+[0-9a-z]|[0-9a-z]+[A-Z])[0-9a-zA-Z]*)+\b|".
     # single bracketed name [Hello World]
@@ -728,6 +729,13 @@
         return "<a href='$link'>$name</a>";
       }
 
+      if (preg_match("/^(w|[A-Z])/",$url)) { # InterWiki or wiki:
+        if (strpos($url," ")) { # have a space ?
+          $dum=explode(" ",$url,2);
+          return $this->interwiki_repl($dum[0],$dum[1]);
+	}
+	return $this->interwiki_repl($url,'');
+      }
       if ($force or strpos($url," ")) { # have a space ?
         list($url,$text)=explode(" ",$url,2);
         $link=str_replace('&','&amp;',$url);
@@ -758,10 +766,40 @@
       return "<a class='externalLink' $attr href='$link'>$url</a>";
     } else {
       if ($url[0]=="?") $url=substr($url,1);
+      return $this->interwiki_repl($url);
       //return $this->word_repl($url,'',$attr);
-	  return $url;
+      //return $url;
     }
   }
+
+  function interwiki_repl($url, $text='') {
+    $interwiki = array ("wiki" => "http://hellocity.net/~iolo/wiki/\$PAGE",
+			"GnomeKorea" => "http://gnome.or.kr/wiki/\$PAGE");
+    if ($url[0]=="w")
+      $url=substr($url,5);
+    $dum=explode(":",$url,2);
+    $wiki=$dum[0]; $page=$dum[1];
+    if (sizeof($dum) == 1) {
+      $wiki="wiki";
+      $page=$dum[0];
+    }
+    if ($text == '') $text=$page;
+    $page = $this->normalize($page);
+
+    $url = $interwiki[$wiki];
+    if (!$url) {
+      return $wiki.":".$page;
+    }
+    $url=str_replace('$PAGE',$page,$url);
+    return "<a href='$url'>$text</a>";
+  }
+
+  function normalize($title) {
+    if (strpos($title," "))
+      #return preg_replace("/[\?!$%\.\^;&\*()_\+\|\[\] ]/","",ucwords($title));
+      return str_replace(" ","",ucwords($title));
+    return $title;
+  }
 }
 
 # vim: ts=8 sw=2 sts=2 noet
diff -urN soojung-0.4.11/classes/Import.class.php soojung/classes/Import.class.php
--- soojung-0.4.11/classes/Import.class.php	2005-03-23 10:10:04.000000000 +0900
+++ soojung/classes/Import.class.php	2005-10-25 10:04:51.000000000 +0900
@@ -443,8 +443,6 @@
     return strtr($string, $trans);
   }
 
-}
-
 function importMoniWiki($wikiPath, $encoding) {
   if (strcasecmp($encoding, 'UTF-8') == 0 || strcasecmp($encoding, 'UTF8') == 0) {
     $needtoconvert = FALSE;
@@ -493,6 +491,7 @@
 	$state = 0;
 	list($content,$comments) = explode("----\n", $summary, 2);
 	$entry[] = $content;
+	$entry[] = $comments;
 	$entries[] = $entry;
 	$summary='';
 	continue;
@@ -505,7 +504,8 @@
     $date = $entry[2];
     $title = $entry[3];
     $body = $entry[4];
-    $body = preg_replace("\\}}}", "}}}", $body);
+    $body = str_replace("\\}}}", "}}}", $body);
+    //$body=preg_replace("/(?<!\\\\)}}}/","\}}}",$body);
     $date = strtotime(str_replace("T", " ", $date));
     $category = "moniwiki";
 
@@ -518,9 +518,33 @@
     $title = trim($title);
     $body = trim($body);
     $date = trim($date);
-    Entry::createEntry($title, $body, $date, $category, $options, "moniwiki");
+    $options = array();
+    $id = Entry::createEntry($title, $body, $date, $category, $options, "moniwiki");
+
+    $comments = $entry[5];
+    $body = "";
+    $lines = explode("\n", $comments);
+    foreach ($lines as $line) {
+      if ($line == "----") {
+      } else if (preg_match("/ -- \[?([^ \]]+)\]? \[\[DateTime\(([^\)]+)\)\]\]/", $line, $match)) {
+	$body.= substr($line, 0, strpos($line, " -- "));
+	$name = $match[1];
+        $date = strtotime(str_replace("T", " ", $match[2]));
+	$homepage = "0:".$match[0]."1:".$match[1]."2:".$match[2]."3:".$match[3]."4:".$match[4]."5:".$match[5]."6:".$match[6]."7:".$match[7];
+	if ($needtoconvert) {
+	  $body = iconv($encoding, "UTF-8", $body);
+	  $name = iconv($encoding, "UTF-8", $name);
+	}
+	Comment::writeComment($id, $name, "", $homepage, $body, $date);
+	$body = "";
+      } else {
+	$body.=$line."\n";
+      }
+    }
   }
 }
 
+}
+
 # vim: ts=8 sw=2 sts=2 noet
 ?>
diff -urN soojung-0.4.11/entry.php soojung/entry.php
--- soojung-0.4.11/entry.php	2005-06-16 19:50:48.000000000 +0900
+++ soojung/entry.php	2005-10-25 09:58:57.000000000 +0900
@@ -6,10 +6,16 @@
 
 if (isset($_POST["blogid"])) {
   $blogid = $_POST["blogid"];
-  $name = $_POST["name"];
-  $email = $_POST["email"];
-  $url = $_POST["url"];
-  $body = $_POST["body"];
+
+  $name_name = $_POST["name_name"];
+  $email_name = $_POST["email_name"];
+  $url_name = $_POST["url_name"];
+  $body_name = $_POST["body_name"];
+
+  $name = $_POST[$name_name];
+  $email = $_POST[$email_name];
+  $url = $_POST[$url_name];
+  $body = $_POST[$body_name];
   
   if (empty($blogid) || empty($name) || empty($body)) {
     echo "input name and comment";
@@ -51,7 +57,11 @@
   }
   $template->assign('entry', $entry);
   $template->assign('trackbacks', $entry->getTrackbacks());
-  $template->assign('comments', $entry->getComments());    
+  $template->assign('comments', $entry->getComments());
+  $template->assign('name_name', rand(1, 1000));
+  $template->assign('email_name', rand(1001, 2000));
+  $template->assign('url_name', rand(2001, 3000));
+  $template->assign('body_name', rand(3001, 4000));    
 }
 
 foreach (array('w_id','w_name','w_email','w_url') as $key) {
diff -urN soojung-0.4.11/settings.php soojung/settings.php
--- soojung-0.4.11/settings.php	2005-09-24 09:44:05.000000000 +0900
+++ soojung/settings.php	2005-10-25 09:58:57.000000000 +0900
@@ -1,6 +1,6 @@
 <?php
 
-$soojung_version = '0.4.11';
+$soojung_version = '0.4.12';
 setlocale(LC_TIME, "C");
 
 header("Content-type: text/html; charset=utf-8");
diff -urN soojung-0.4.11/templates/simple/entry.tpl soojung/templates/simple/entry.tpl
--- soojung-0.4.11/templates/simple/entry.tpl	2005-09-04 14:35:35.000000000 +0900
+++ soojung/templates/simple/entry.tpl	2005-10-25 09:58:58.000000000 +0900
@@ -50,14 +50,18 @@
 <div>
 Post a comment<br />
 Name:<br />
-<input type="text" name="name" value="{$w_name|escape}" /><br />
+<input type="text" name="{$name_name}" value="{$w_name|escape}" /><br />
 Email Address:<br />
-<input type="text" name="email" value="{$w_email|escape}" /><br />
+<input type="text" name="{$email_name}" value="{$w_email|escape}" /><br />
 URL:<br />
-<input type="text" name="url" value="{$w_url|default:"http://"|escape}" /><br />
+<input type="text" name="{$url_name}" value="{$w_url|default:"http://"|escape}" /><br />
 Comments:<br />
-<textarea name="body" rows="5" cols="40"></textarea><br />
+<textarea name="{$body_name}" rows="5" cols="40"></textarea><br />
 <input type="hidden" name="blogid" value="{$entry->entryId}" />
+<input type="hidden" name="name_name" value="{$name_name}" />
+<input type="hidden" name="email_name" value="{$email_name}" />
+<input type="hidden" name="url_name" value="{$url_name}" />
+<input type="hidden" name="body_name" value="{$body_name}" />
 <input type="submit" value="Post" />
 </div>
 </form>
