diff -urN soojung-0.4.5/TODO soojung/TODO
--- soojung-0.4.5/TODO	2004-12-24 12:09:15.000000000 +0900
+++ soojung/TODO	2005-03-11 22:03:46.000000000 +0900
@@ -7,5 +7,4 @@
 카테고리 대분류(혹은 다중 깊이 트리)
 plugin 환경 구축
 설치 할 때 인코딩 설정 할 수 있게 만들기(기본은 utf-8)
-달력보여주기 (글 쓴 날짜, 안 쓴 날자, 전달, 월별 archive 별 달력)
 모니위키와 연동 기능, 혹은 키워드 설정기능
diff -urN soojung-0.4.5/admin.php soojung/admin.php
--- soojung-0.4.5/admin.php	2005-02-19 18:07:16.000000000 +0900
+++ soojung/admin.php	2005-03-11 22:03:46.000000000 +0900
@@ -115,6 +115,7 @@
   $template->assign("admin_name", $admin_name);
   $template->assign("admin_email", $admin_email);
   $template->assign("templates", Soojung::getTemplates());
+  $template->assign("config_writable", is_writable("config.php"));
   $template->display('config.tpl');
 } else if ($_GET["mode"] == "data") {
   $template->display('data.tpl');
@@ -127,13 +128,13 @@
   if ($page > 1) {
     $template->assign('prev_page_link', "admin.php?mode=list&page=" . ($page - 1));
   }
-  if (Entry::getEntryCount() > $page * 10) {
+  if (Entry::getEntryCount(false) > $page * 10) {
     $template->assign('next_page_link', "admin.php?mode=list&page=" . ($page + 1));
   }
-  $template->assign('entries', Entry::getEntries(10, $page));
+  $template->assign('entries', Entry::getEntries(10, $page, false));
   $template->display('list.tpl');
 } else {
-  $template->assign('recent_entries', Entry::getRecentEntries(5));
+  $template->assign('recent_entries', Entry::getRecentEntries(5, false));
   $template->assign('recent_comments', Comment::getRecentComments(5));
   $template->assign('recent_trackbacks', Trackback::getRecentTrackbacks(5));
   $template->assign('entry_count', Entry::getEntryCount());
diff -urN soojung-0.4.5/classes/Bookmark.class.php soojung/classes/Bookmark.class.php
--- soojung-0.4.5/classes/Bookmark.class.php	2005-02-20 11:13:25.000000000 +0900
+++ soojung/classes/Bookmark.class.php	2005-03-01 02:01:20.000000000 +0900
@@ -22,8 +22,8 @@
     $fd = fopen($filename, "r");
     $this->number = Soojung::filenameToEntryId($filename);
     $this->name = trim(strstr(fgets($fd, 1024), ' '));
-    $this->url = htmlspecialchars(trim(strstr(fgets($fd, 1024), ' ')), ENT_QUOTES, "UTF-8");
-    $this->image = htmlspecialchars(trim(strstr(fgets($fd, 1024), ' ')), ENT_QUOTES, "UTF-8");
+    $this->url = trim(strstr(fgets($fd, 1024), ' '));
+    $this->image = trim(strstr(fgets($fd, 1024), ' '));
     $this->desc = trim(strstr(fgets($fd, 1024), ' '));
     fclose($fd);
   }
diff -urN soojung-0.4.5/classes/Calendar.class.php soojung/classes/Calendar.class.php
--- soojung-0.4.5/classes/Calendar.class.php	2005-02-19 10:46:05.000000000 +0900
+++ soojung/classes/Calendar.class.php	2005-03-08 22:28:41.000000000 +0900
@@ -81,8 +81,8 @@
       }
       $weekday = ($weekday + 1) % 7;
     }
-    if ($weekday < 6) {
-      $cal .= "</tr>\n";
+    if ($weekday > 0) {
+      $cal .= str_repeat("<td></td>", 7-$weekday)."</tr>\n";
     }
     $cal .= "</table></div>\n";
     return $cal;
diff -urN soojung-0.4.5/classes/Entry.class.php soojung/classes/Entry.class.php
--- soojung-0.4.5/classes/Entry.class.php	2005-02-19 05:37:25.000000000 +0900
+++ soojung/classes/Entry.class.php	2005-03-11 22:09:36.000000000 +0900
@@ -35,7 +35,7 @@
     
     //read header
     $this->date = trim(strstr(fgets($fd, 1024), ' '));
-    $this->title = htmlspecialchars(trim(strstr(fgets($fd, 1024), ' ')), ENT_QUOTES, "UTF-8");
+    $this->title = trim(strstr(fgets($fd, 1024), ' '));
     $this->category = new Category(trim(strstr(fgets($fd, 1024), ' ')));
     $this->options = explode("|", trim(strstr(fgets($fd, 1024), ' ')));
     $this->format = trim(strstr(fgets($fd, 1024), ' '));
@@ -55,7 +55,8 @@
     global $blog_baseurl, $blog_fancyurl;
 
     if ($blog_fancyurl) {
-      return $blog_baseurl . "/" . urlencode($this->category->name) . date("/Y/m/d/", $this->date) . $this->entryId . ".html";
+      $_category = preg_replace('/%2F/i','/',urlencode($this->category->name));
+      return $blog_baseurl . "/" . $_category . date("/Y/m/d/", $this->date) . $this->entryId . ".html";
     } else {
       return $blog_baseurl . '/entry.php?blogid=' . $this->entryId;
     }
@@ -119,7 +120,6 @@
     }
     $foptions = "";
     if (in_array("STATIC", $options)) {
-      print $title;
       $foptions .= "S";
     }
     $categoryclass = new Category($category);
@@ -166,8 +166,8 @@
   /**
    * static method
    */
-  function getEntryCount() {
-    return Soojung::queryNumFilenameMatch("^[0-9].+[.]entry$");
+  function getEntryCount($hide=true) {
+    return Soojung::queryNumFilenameMatch(Entry::_getQuery($hide));
   }
 
   /**
@@ -179,12 +179,25 @@
   }
 
   /**
+   * private static method
+   */
+  function _getQuery($hide) {
+    if ($hide == false) {
+      $query = "[.]entry$";
+    } else {
+      $query = "^[0-9].+[.]entry$";
+    }
+    return $query;
+  }
+
+  /**
    * static method
    */
-  function getEntries($count, $page) {
+  function getEntries($count, $page, $hide=true) {
     $entries = array();
-    $filenames = Soojung::queryFilenameMatch("^[0-9].+[.]entry$");
-    rsort($filenames);
+    $query = Entry::_getQuery($hide);
+    $filenames = Soojung::queryFilenameMatch($query);
+    usort($filenames, "cmp_base_filename");
     $index = ($page - 1) * $count;
 
     for ($i = $index; $i < count($filenames) && $i < ($index + $count); $i++) {
@@ -200,10 +213,7 @@
    */
   function getAllEntries($hide=true) {
     $entries = array();
-    $query = "^[0-9].+[.]entry$";
-    if ($hide == false) {
-      $query = "[.]entry$";
-    }
+    $query = Entry::_getQuery($hide);
     $filenames = Soojung::queryFilenameMatch($query);
     usort($filenames, "cmp_base_filename");
     foreach($filenames as $filename) {
@@ -215,8 +225,8 @@
   /**
    * static method
    */
-  function getRecentEntries($count=10) {
-    return Entry::getEntries($count, 1);
+  function getRecentEntries($count=10, $hide=true) {
+    return Entry::getEntries($count, 1, $hide);
   }
 
   /**
diff -urN soojung-0.4.5/classes/Formatter.class.php soojung/classes/Formatter.class.php
--- soojung-0.4.5/classes/Formatter.class.php	2005-02-19 05:37:25.000000000 +0900
+++ soojung/classes/Formatter.class.php	2005-02-24 23:15:59.000000000 +0900
@@ -211,8 +211,8 @@
         'BBcodeFormatter::__listing("\1","\2")',
         'BBcodeFormatter::__escape("<a href=\\"\1\\">\1</a>")',
         'BBcodeFormatter::__escape("<a href=\\"\2\\">\3</a>")',
-        'BBcodeFormatter::__escape("<img src=\\"\1\\" width=\\"\\" height=\\"\\" alt=\\"\1\\\" />")',
-        'BBcodeFormatter::__escape("<img src=\\"\2\\" width=\\"\\" height=\\"\\" alt=\\"\3\\\" />")',
+        'BBcodeFormatter::__escape("<img src=\\"\1\\" width=\\"\\" height=\\"\\" alt=\\"\1\\\" class=\\"bbcode\\" />")',
+        'BBcodeFormatter::__escape("<img src=\\"\2\\" width=\\"\\" height=\\"\\" alt=\\"\3\\\" class=\\"bbcode\\" />")',
         'BBcodeFormatter::__escape("<a href=\\"mailto:\1\\">\1</a>")'),
       $rule2 = array(
         '#http://(?:[-0-9a-z_.@:~\\#%=+?/]|&amp;)+#i',
diff -urN soojung-0.4.5/classes/Soojung.class.php soojung/classes/Soojung.class.php
--- soojung-0.4.5/classes/Soojung.class.php	2005-02-20 11:13:25.000000000 +0900
+++ soojung/classes/Soojung.class.php	2005-03-11 22:09:36.000000000 +0900
@@ -190,6 +190,8 @@
     fwrite($f, $_POST["url"] . "/index.php?archive=$1$2$3\n");
     fwrite($f, "RewriteRule ^([^/.]+)$ ");
     fwrite($f, $_POST["url"] . "/index.php?category=$1\n");
+    fwrite($f, "RewriteRule ^([^/.]+)/([^/.]+)$ ");
+    fwrite($f, $_POST["url"] . "/index.php?category=$1/$2\n");
     fwrite($f, "RewriteRule ^page/([0-9]+)$ ");
     fwrite($f, $_POST["url"] . "/index.php?page=$1\n");
     fclose($f);
diff -urN soojung-0.4.5/classes/Template.class.php soojung/classes/Template.class.php
--- soojung-0.4.5/classes/Template.class.php	2005-02-12 22:53:01.000000000 +0900
+++ soojung/classes/Template.class.php	2005-02-27 11:46:15.000000000 +0900
@@ -13,8 +13,8 @@
     
     $this->force_compile = false;
 
-    $this->assign('title', $blog_name);
-    $this->assign('description', $blog_desc);
+    $this->assign('title', htmlspecialchars($blog_name));
+    $this->assign('description', htmlspecialchars($blog_desc));
     $this->assign('baseurl', $blog_baseurl);
     $this->assign('soojung_version', $soojung_version);
   }
diff -urN soojung-0.4.5/entry.php soojung/entry.php
--- soojung-0.4.5/entry.php	2005-02-12 22:52:45.000000000 +0900
+++ soojung/entry.php	2005-03-11 22:03:46.000000000 +0900
@@ -44,9 +44,12 @@
 $template = new UserTemplate('entry.tpl', $blogid);
 if (!$template->is_cached('entry.tpl', $blogid)) {
   $entry = Entry::getEntry($blogid);
+  if ($entry->isSetOption("SECRET")) {
+    exit;
+  }
   $template->assign('entry', $entry);
   $template->assign('trackbacks', $entry->getTrackbacks());
-  $template->assign('comments', $entry->getComments());
+  $template->assign('comments', $entry->getComments());    
 }
 
 foreach (array('w_id','w_name','w_email','w_url') as $key) {
diff -urN soojung-0.4.5/install.php soojung/install.php
--- soojung-0.4.5/install.php	2005-02-19 18:37:52.000000000 +0900
+++ soojung/install.php	2005-02-24 23:20:56.000000000 +0900
@@ -1,6 +1,18 @@
 <?php
 include_once("classes/Soojung.class.php");
 include_once("libs/util.php");
+
+if (get_magic_quotes_gpc()) {
+  function stripslashes_deep($value) {
+    $value = is_array($value) ?
+      array_map('stripslashes_deep', $value) :
+      stripslashes($value);
+    return $value;
+  }
+  $_POST = array_map('stripslashes_deep', $_POST);
+  $_GET = array_map('stripslashes_deep', $_GET);
+  $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
+}
 ?>
 
 <html>
diff -urN soojung-0.4.5/libs/common.js soojung/libs/common.js
--- soojung-0.4.5/libs/common.js	1970-01-01 09:00:00.000000000 +0900
+++ soojung/libs/common.js	2005-02-24 23:15:59.000000000 +0900
@@ -0,0 +1,18 @@
+function fold_sidebar(objid) {
+	document.getElementById(objid).className =
+		(document.getElementById(objid).className ? '' : 'hide');
+	return false;
+}
+
+function correct_bbcode_image() {
+	objs = document.getElementsByTagName('IMG');
+	for(i=0; i<objs.length; i++) {
+		obj = objs[i];
+		if(obj.className != 'bbcode') continue;
+		img = new Image();
+		img.src = obj.src;
+		obj.width = img.width;
+		obj.height = img.height;
+	}
+	return false;
+}
diff -urN soojung-0.4.5/post.php soojung/post.php
--- soojung-0.4.5/post.php	2005-02-19 05:37:25.000000000 +0900
+++ soojung/post.php	2005-03-11 23:19:19.000000000 +0900
@@ -1,10 +1,40 @@
 <?php
+session_cache_limiter('private'); 
 session_start();
 
+include("config.php");
 include("settings.php");
 
+if ($_POST["mode"] == "login") {
+  if (md5($_POST["password"]) == $admin_password)
+    $_SESSION['auth'] = TRUE;
+  $_POST["mode"] = $_POST["original_mode"];
+  $_POST["body"] = base64_decode($_POST["body"]);
+#  echo "mode = ". $_POST["mode"];
+} 
+
 if (!isset($_SESSION["auth"])) {
-  echo "<meta http-equiv='refresh' content='0;URL=admin.php'>";
+  $hidden_attr = array();
+  $param["name"] = "original_mode";
+  $param["value"] = $_POST["mode"];
+  $hidden_attr[] = $param;
+  
+  $list = array("title", "format", "date", "category", "category_input", "body", "SECRET", "NO_COMMENT", "NO_TRACKBACK", "STATIC", "NO_RSS");
+  foreach ($list as $key) {
+    if (array_key_exists($key, $_POST)) {
+      $param["name"] = $key;
+      if ($key == "body")
+	$param["value"] = base64_encode($_POST[$key]);
+      else
+	$param["value"] = htmlspecialchars($_POST[$key]);
+      $hidden_attr[] = $param;
+    }
+  }
+  
+  $template = new AdminTemplate;
+  $template->assign('original_dst', $_SERVER["PHP_SELF"]);
+  $template->assign('hidden_attr', $hidden_attr);
+  $template->display('login.tpl');
   exit;
 }
 
@@ -72,6 +102,7 @@
   $format = $_POST["format"];
   $formatter = Soojung::getFormatter($format);
   $body = $formatter->onPost($_POST["body"]);
+  $body = nl2br($body);
   $date = strtotime($_POST["date"]);
   if (empty($_POST["category_input"]) == false) {
     $category = trim($_POST["category_input"]);
diff -urN soojung-0.4.5/rss2.php soojung/rss2.php
--- soojung-0.4.5/rss2.php	2005-02-19 05:37:25.000000000 +0900
+++ soojung/rss2.php	2005-03-01 02:01:20.000000000 +0900
@@ -11,14 +11,14 @@
   function convenc($str) { return $str; }
 }
 
-header("Content-type: text/xml");
+header("Content-type: text/xml; charset=$encoding");
 echo "<?xml version=\"1.0\" encoding=\"$encoding\"?>\n";
 ?>
 <rss version="2.0">
 <channel>
-<title><?=convenc($blog_name)?></title>
+<title><?=htmlspecialchars(convenc($blog_name))?></title>
 <link><?=$blog_baseurl?></link>
-<description><?=convenc($blog_desc)?></description>
+<description><?=htmlspecialchars(convenc($blog_desc))?></description>
 <copyright></copyright>
 <pubDate><?=date('r')?></pubDate>
 <generator>soojung <?=$soojung_version?></generator>
@@ -42,11 +42,11 @@
   $post_text = $formatter->toRSS($post_text);
 
   echo "<item>\n";
-  echo "<title>" . convenc($e->title) . "</title>\n";
+  echo "<title>" . htmlspecialchars(convenc($e->title)) . "</title>\n";
   echo "<link>" . $e->getHref() . "</link>\n";
   echo "<pubDate>" . date('r', $e->date) . "</pubDate>\n";
-  echo "<category>" . convenc($e->category->name) . "</category>\n";
-  echo "<description>" . convenc(htmlspecialchars($post_text)) . "</description>\n";
+  echo "<category>" . htmlspecialchars(convenc($e->category->name)) . "</category>\n";
+  echo "<description>" . htmlspecialchars(convenc($post_text)) . "</description>\n";
   echo "</item>\n";
 }
 ?>
diff -urN soojung-0.4.5/settings.php soojung/settings.php
--- soojung-0.4.5/settings.php	2005-02-19 01:52:00.000000000 +0900
+++ soojung/settings.php	2005-03-11 22:03:46.000000000 +0900
@@ -1,8 +1,9 @@
 <?php
 
-$soojung_version = '0.4.5';
+$soojung_version = '0.4.6';
 setlocale(LC_TIME, "C");
 
+header("Content-type: text/html; charset=utf-8");
 if (!file_exists("config.php")) {
   echo "please execute install.php first.";
   exit;
diff -urN soojung-0.4.5/templates/acid/entry.tpl soojung/templates/acid/entry.tpl
--- soojung-0.4.5/templates/acid/entry.tpl	2005-02-03 07:43:37.000000000 +0900
+++ soojung/templates/acid/entry.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -1,7 +1,7 @@
 {include file="header.tpl"}
 
 <div class="entry">
-<h2>{$entry->title}</h2>
+<h2>{$entry->title|escape}</h2>
 {$entry->getBody()}
 <p class="posted">{$entry->date|date_format:"%B %d, %Y %I:%M %p"}</p>
 </div>
@@ -13,9 +13,9 @@
 {foreach from=$trackbacks item=trackback}
 	<div class="trackback">
 	<a name="{$trackback->date}"></a>
-	<a href="{$trackback->url}">{$trackback->url}</a><br />
-	{$trackback->title}<br />
-	{$trackback->getExcerpt()|strip_tags}
+	<a href="{$trackback->url|escape}">{$trackback->url|escape}</a><br />
+	{$trackback->title|escape}<br />
+	{$trackback->getExcerpt()|strip_tags|escape}
 	</div>
 {/foreach}
 </div>
@@ -30,11 +30,11 @@
 	<a name="{$comment->date}"></a>
 	On {$comment->date|date_format:"%B %d, %Y %I:%M %p"}, 
 	{if $comment->homepage != ""}
-		<a href="{$comment->homepage}">{$comment->name}</a>
+		<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 	{elseif $comment->email != ""}
-		<a href=mailto:"{$comment->email}">{$comment->name}</a>
+		<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 	{else}
-		{$comment->name}
+		{$comment->name|escape}
 	{/if}
 	said: <br />
 	{$comment->getBody()}
@@ -45,11 +45,11 @@
 <form action="" method="post">
 Post a comment<br />
 Name:<br />
-<input type="text" name="name" value="{$w_name}"><br />
+<input type="text" name="name" value="{$w_name|escape}"><br />
 Email Adress:<br />
-<input type="text" name="email" value="{$w_email}"><br />
+<input type="text" name="email" value="{$w_email|escape}"><br />
 URL:<br />
-<input type="text" name="url" value="{$w_url|default:"http://"}"><br />
+<input type="text" name="url" value="{$w_url|default:"http://"|escape}"><br />
 Comments:<br />
 <textarea name="body" rows="5" cols="40"></textarea><br />
 <input type="hidden" name="blogid" value="{$entry->entryId}">
diff -urN soojung-0.4.5/templates/acid/header.tpl soojung/templates/acid/header.tpl
--- soojung-0.4.5/templates/acid/header.tpl	2005-02-20 11:13:25.000000000 +0900
+++ soojung/templates/acid/header.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -5,15 +5,9 @@
 <title>{$title}</title>
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
-<script type="text/javascript">/*<![CDATA[*/{literal}
-function fold_sidebar(objid) {
-document.getElementById(objid).className =
-(document.getElementById(objid).className ? '' : 'div_hide');
-return false;
-}
-{/literal}/*]]>*/</script>
+<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 </head>
-<body>
+<body onload="return correct_bbcode_image();">
 <div id="header"><a href="{$baseurl}" title="{$description}">{$title}</a></div>
 <div id="sidebar">
 <h3><a href="#none" onclick="return fold_sidebar('div_menu');">Menu</a></h3>
@@ -21,7 +15,7 @@
 	<li><a href="{$baseurl}/index.php">main</a></li>
 	<li><a href="{$baseurl}/admin.php">admin</a></li>
 	{foreach from=$static_entries item=static}
-	<li><a href="{$static->getHref()}">{$static->title}</a></li>
+	<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 	{/foreach}
 </ul>
 
@@ -34,7 +28,7 @@
 <ul id="div_category">
 	{foreach from=$categories item=category}
 	<li>
-		<a href="{$category->getHref()}">{$category->name}</a> 
+		<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
 		({$category->getEntryCount()})
 	</li>
 	{foreachelse}
@@ -46,7 +40,7 @@
 <ul id="div_archive" class="div_hide">
 	{foreach from=$archvies item=archive}
 	<li>
-		<a href="{$archive->getHref()}">{$archive->getDate()|date_format:"%B %Y"}</a>
+		<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -57,7 +51,7 @@
 <ul id="div_recent_entry" class="div_hide">
 	{foreach from=$recent_entries item=entry}
 	<li>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -69,7 +63,7 @@
 <ul id="div_recent_comment" class="div_hide">
 	{foreach from=$recent_comments item=comment}
 	<li>
-		<a href="{$comment->getHref()}">{$comment->getBody()|strip_tags:false}</a>
+		<a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false|escape}</a>
 	</li>
 	{/foreach}
 </ul>
@@ -80,7 +74,7 @@
 <ul id="div_recent_trackback" class="div_hide">
 	{foreach from=$recent_trackbacks item=trackback}
 	<li>
-		<a href="{$trackback->getHref()}">{$trackback->url}</a>
+		<a href="{$trackback->getHref()|escape}">{$trackback->url|escape}</a>
 	</li>
 	{/foreach}
 </ul>
@@ -102,7 +96,7 @@
 <ul id="div_bookmark" class="div_hide">
 	{foreach from=$bookmarks item=bookmark}
 	<li>
-		<a href="{$bookmark->url}">{$bookmark->name}</a>
+		<a href="{$bookmark->url|escape}">{$bookmark->name|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
diff -urN soojung-0.4.5/templates/acid/index.tpl soojung/templates/acid/index.tpl
--- soojung-0.4.5/templates/acid/index.tpl	2005-02-03 07:43:37.000000000 +0900
+++ soojung/templates/acid/index.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -3,37 +3,37 @@
 {if $view == "index"}
 	{foreach from=$entries item=entry}
 		<div class="entry">
-		<h2><a href="{$entry->getHref()}">{$entry->title}</a></h2>
+		<h2><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h2>
 		{$entry->getBody()}
 		<p class="posted">
-			<a class="plink" href="{$entry->getHref()}">{$entry->date|date_format:"%B %d, %Y"}</a>
-			{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="{$entry->getHref()}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
-			{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
+			<a class="plink" href="{$entry->getHref()|escape}">{$entry->date|date_format:"%B %d, %Y"}</a>
+			{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
+			{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()|escape}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
 
 		</p>
 		</div>
 	{/foreach}
 	{if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 	{/if}
 	{if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 	{/if}
 {elseif $view == "archive"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
 {elseif $view == "category"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
 {elseif $view == "search"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
diff -urN soojung-0.4.5/templates/admin/config.tpl soojung/templates/admin/config.tpl
--- soojung-0.4.5/templates/admin/config.tpl	2005-02-19 18:02:46.000000000 +0900
+++ soojung/templates/admin/config.tpl	2005-02-24 22:18:34.000000000 +0900
@@ -7,25 +7,25 @@
 
 <div class="row">
 <span class="label">Blog Name:</span>
-<span class="formw"><input type="text" name="blogname" value="{$blog_name}"></span>
+<span class="formw"><input type="text" name="blogname" value="{$blog_name}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">Blog Description:</span>
-<span class="formw"><input type="text" name="desc" value="{$blog_desc}"></span>
+<span class="formw"><input type="text" name="desc" value="{$blog_desc}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">Blog URL:</span>
-<span class="formw"><input type="text" name="url" value="{$baseurl}"></span>
+<span class="formw"><input type="text" name="url" value="{$baseurl}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">Blog Skin:</span>
 <span class="formw">
-<select name="skin">
+<select name="skin" {if !$config_writable}disabled{/if}>
 {foreach from=$templates item=template}
-<option value="{$template}" {if $blog_skin == $template}selected{/if}>{$template}
+<option value="{$template}" {if $blog_skin == $template}selected{/if} {if !$config_writable}disabled{/if}>{$template}
 {/foreach}
 </select>
 </span>
@@ -34,7 +34,7 @@
 <div class="row">
 <span class="label">Entries License:</span>
 <span class="formw">
-<select name="license">
+<select name="license" {if !$config_writable}disabled{/if}>
 <option value="none" {if $license == "none"}selected{/if}>None (All rights reserved)</option>
 <option value="by" {if $license == "by"}selected{/if}>Attribution License</option>
 <option value="by-nd" {if $license == "by-nd"}selected{/if}>Attribution-NoDerivs License</option>
@@ -49,55 +49,46 @@
 
 <div class="row">
 <span class="label">Admin Name:</span>
-<span class="formw"><input type="text" name="adminname" value="{$admin_name}"></span>
+<span class="formw"><input type="text" name="adminname" value="{$admin_name}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">Admin Email:</span>
-<span class="formw"><input type="text" name="email" value="{$admin_email}"></span>
+<span class="formw"><input type="text" name="email" value="{$admin_email}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">Admin Password:</span>
-<span class="formw"><input type="password" name="password"> <i>If you want change the password, input new password.</i></span>
+<span class="formw"><input type="password" name="password" {if !$config_writable}disabled{/if}> <i>If you want change the password, input new password.</i></span>
 </div>
 
 <div class="row">
 <span class="label">entries per page:</span>
-<span class="formw"><input type="text" name="perpage" value="{$blog_entries_per_page}"></span>
+<span class="formw"><input type="text" name="perpage" value="{$blog_entries_per_page}" {if !$config_writable}disabled{/if}></span>
 </div>
 
 <div class="row">
 <span class="label">fancy URL:</span>
 <span class="formw">
-<input type="checkbox" name="fancyurl"
-{if $blog_fancyurl == true}
-	checked="on">
-{else}
-	>
-{/if}
+<input type="checkbox" name="fancyurl" {if $blog_fancyurl}checked{/if} {if !$config_writable}disabled{/if}>
 </span>
 </div>
 
 <div class="row">
 <span class="label">notify email:</span>
 <span class="formw">
-<input type="checkbox" name="notify"
-{if $blog_notify == true}
-	checked="on">
-{else}
-	>
-{/if}
+<input type="checkbox" name="notify" {if $blog_notify}checked{/if} {if !$config_writable}disabled{/if}>
 </span>
 </div>
 
 <input type="hidden" name="mode" value="config_update">
 
 <div class="row">
-<span class="label"><input type="submit" value="update"></span>
+<span class="label"><input type="submit" value="update" {if !$config_writable}disabled{/if}></span>
 </div>
 
 </form>
 
 </div>
+{if !$config_writable}<font color="red">Soojung doesn't have <b>WRITE</b> permission to <b>config.php</b>.</font>{/if}
 {include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/admin/login.tpl soojung/templates/admin/login.tpl
--- soojung-0.4.5/templates/admin/login.tpl	2005-01-25 22:14:36.000000000 +0900
+++ soojung/templates/admin/login.tpl	2005-03-10 23:59:09.000000000 +0900
@@ -1,9 +1,15 @@
 {include file="header.tpl"}
-
+{if $original_dst eq ""}
 <form name="loginForm" action="{$baseurl}/admin.php" method="post">
+{else}
+<form name="loginForm" action="{$original_dst}" method="post">
+{/if}
 Password: <input type="password" name="password">
 <input type="hidden" name="mode" value="login">
 <input type="submit" value="Log In">
+{foreach from=$hidden_attr item=attr}
+	 <input type="hidden" name="{$attr.name}" value="{$attr.value}" />
+{/foreach}
 </form>
 
 <script type="text/javascript">
diff -urN soojung-0.4.5/templates/admin/overview.tpl soojung/templates/admin/overview.tpl
--- soojung-0.4.5/templates/admin/overview.tpl	2005-02-05 14:29:29.000000000 +0900
+++ soojung/templates/admin/overview.tpl	2005-03-11 22:03:47.000000000 +0900
@@ -2,101 +2,90 @@
 {include file="menu.tpl"}
 
 <div id="overview">
-
-<div class="content_entry">
-<h2>Recent Posts</h2>
-<table>
-{foreach from=$recent_entries item=entry}
-<tr>
-<div class="entry_item">
-<td>
-<div class="entry_title">
-<a href="{$baseurl}/post.php?blogid={$entry->entryId}">{$entry->title}</a>
-</div>
-</td>
-<td>
-<a href="{$baseurl}/admin.php?mode=delete_entry&blogid={$entry->entryId}" onclick="return confirm('Are you sure want to delete this entry?\nTitle: {$entry->title}');">X</a>
-</td>
-<td>
-<a href="{$baseurl}/sendping.php?blogid={$entry->entryId}">Ping</a>
-</td>
-</div>
-</tr>
-{/foreach}
-</table>
-</div>
-
-<div class="content_comment">
-<h2>Recent Comments</h2>
-<table>
-	{foreach from=$recent_comments item=comment}
-	<tr>
-	<div class="comment_item">
-		<td>
-			{$comment->name}
-		</td>
-		<td>
-			<div class="entry_title">
-			<a href="{$comment->getHref()}">{$comment->getBody()|strip_tags:false|truncate:40}</a>
-			</div>
-		</td>
-		<td>
-			<a href="{$baseurl}/admin.php?mode=delete&file={$comment->filename}" onclick="return confirm('Are you sure want to delete this comment?\nAuthor: {$comment->name}');">X</a>
-		</td>
-	</div>
-	</tr>
-	{/foreach}
-</table>
-</div>
-
-<div class="content_trackback">
-<h2>Recent Trackback</h2>
-<table>
-	{foreach from=$recent_trackbacks item=trackback}
-	<tr>
-	<div class="trackback_item">
-		<td>
-			<div class="entry_title">
-			<a href="{$trackback->getHref()}">{$trackback->url}</a>
-			</div>
-		</td>
-		<td>
-			<a href="{$baseurl}/admin.php?mode=delete&file={$trackback->filename}" onclick="return confirm('Are you sure want to delete this trackback?\nURL: {$trackback->url}');">X</a>
-		</td>
-	</div>
-	</tr>
-	{/foreach}
-</table>
-</div>
-
-<div class="content_info">
-<h2>Blog Stat</h2>
-<table>
-	<tr>
-		<td>Entry Count:</td>
-		<td><b>{$entry_count}</b></td>
-	</tr>
-	<!--
-	<tr>
-		<td>Comment Count:</td>
-		<td><b>123</b></td>
-	</tr>
-	<tr>
-		<td>Trackback Count:</td>
-		<td><b>10</b></td>
-	</tr>
-	-->
-	<tr>
-		<td><a href="{$baseurl}/admin.php?mode=clear_cache">Clear cache</a></td>
-		<td></td>
-	</tr>
-	<tr>
-		<td><a href="{$baseurl}/admin.php?mode=clear_referer">Clear referer</a></td>
-		<td></td>
-	</tr>
-</table>
-</div>
-
+    <table width="100%">
+      <tr>
+	
+	<td width="50%">
+	  <h2>Recent Posts</h2>
+	  <table>
+	    {foreach from=$recent_entries item=entry}
+	    <tr class="row">
+	      <td>
+		<div class="entry_title">
+		  <a href="{$baseurl}/post.php?blogid={$entry->entryId}">{$entry->title}</a>
+		</div>
+	      </td>
+	      <td width="1%">
+		<a href="{$baseurl}/admin.php?mode=delete_entry&blogid={$entry->entryId}" onclick="return confirm('Are you sure want to delete this entry?\nTitle: {$entry->title}');">X</a>
+	      </td>
+	      <td width="1%">
+		<a href="{$baseurl}/sendping.php?blogid={$entry->entryId}">Ping</a>
+	      </td>
+	    </tr>
+	    {/foreach}
+	  </table>
+	</td>
+	
+	<td width="50%">
+	  <h2>Recent Comments</h2>
+	  <table>
+	    {foreach from=$recent_comments item=comment}
+	    <tr class="row">
+	      <td>
+		{$comment->name}
+	      </td>
+	      <td>
+		<div class="entry_title">
+		  <a href="{$comment->getHref()}">{$comment->getBody()|strip_tags:false|truncate:40}</a>
+		</div>
+	      </td>
+	      <td width="1%">
+		<a href="{$baseurl}/admin.php?mode=delete&file={$comment->filename}" onclick="return confirm('Are you sure want to delete this comment?\nAuthor: {$comment->name}');">X</a>
+	      </td>
+	    </tr>
+	    {/foreach}
+	  </table>
+	</td>
+      </tr>
+      
+      <tr>
+	<td width="50%">
+	  <h2>Recent Trackback</h2>
+	  <table>
+	    {foreach from=$recent_trackbacks item=trackback}
+	    <tr class="row">
+	      <td>
+		<div class="entry_title">
+		  <a href="{$trackback->getHref()}">{$trackback->url}</a>
+		</div>
+	      </td>
+	      <td width="1%">
+		<a href="{$baseurl}/admin.php?mode=delete&file={$trackback->filename}" onclick="return confirm('Are you sure want to delete this trackback?\nURL: {$trackback->url}');">X</a>
+	      </td>
+	    </tr>
+	    {/foreach}
+	  </table>
+	</td>
+	
+	<td width="50%">
+	  <h2>Blog Stat</h2>
+	  <table>
+	    <tr>
+	      <td>Entry Count:</td>
+	      <td><b>{$entry_count}</b></td>
+	    </tr>
+	    <tr>
+	      <td><a href="{$baseurl}/admin.php?mode=clear_cache">Clear cache</a></td>
+	      <td></td>
+	    </tr>
+	    <tr>
+	      <td><a href="{$baseurl}/admin.php?mode=clear_referer">Clear referer</a></td>
+	      <td></td>
+	    </tr>
+	  </table>
+	</td>
+      </tr>
+    </table>
 </div>
 
 {include file="footer.tpl"}
\ No newline at end of file
diff -urN soojung-0.4.5/templates/admin/post.tpl soojung/templates/admin/post.tpl
--- soojung-0.4.5/templates/admin/post.tpl	2005-02-19 05:38:46.000000000 +0900
+++ soojung/templates/admin/post.tpl	2005-03-11 22:03:47.000000000 +0900
@@ -1,14 +1,6 @@
 {include file="header.tpl"}
 {include file="menu.tpl"}
 
-{if $mode == "preview"}
-<h1>preview</h1>
-<h2>{$title}</h2>
-{$body}
-<br />
-{$category}, {$date}
-<hr />
-{/if}
 
 <div id="post">
 <form action="{$baseurl}/post.php" method="post" name="postForm">
@@ -93,5 +85,14 @@
 </div>
 
 </form>
+
+{if $mode == "preview"}
+<h1>Preview</h1>
+<h2>{$title}</h2>
+{$body}
+<br />
+{$category}, {$date}
+{/if}
+
 </div>
 {include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/admin/styles.css soojung/templates/admin/styles.css
--- soojung-0.4.5/templates/admin/styles.css	2005-02-20 11:16:05.000000000 +0900
+++ soojung/templates/admin/styles.css	2005-03-11 22:03:47.000000000 +0900
@@ -68,57 +68,28 @@
   padding: 3px;
 }
 
-.entry_title
-{ 
-  white-space:nowrap;
-  overflow:hidden;
-}
-
-.content_entry
+#overview td
 {
-  position:absolute;
-  margin: 0px 50% 10px 0px;
-  border:1px dashed #999;
-  background-color:white;
-  z-index: 3;
-
-  max-width: 300px;
-  min-width: 300px;
+  vertical-align: top;
 }
 
-.content_comment
-{
-  position:absolute;
-  margin-left: 320px;
-  margin-right: 10px;
-  border:1px dashed #999;
-  background-color:white;
+tr .row:hover
+{ 
+  background-color: #4a5e7d;
 }
-
-.content_trackback
-{
-  position:absolute;
-  top: 190px;
-  margin: 0px 50% 10px 0px;
-  border:1px dashed #999;
-  background-color:white;
-  z-index: 3;
-
-  max-width: 300px;
-  min-width: 300px;
+tr .row:hover
+{ 
+  color: #fff;
+}
+tr .row:hover a
+{ 
+  color: #fff;
 }
 
-.content_info
-{
-  position:absolute;
-  top: 190px;
-  margin-left: 320px;
-  margin-right: 10px;
-  border:1px dashed #999;
-  background-color:white;
-
-  height: 145px;
-  min-width: 300px;
+.entry_title
+{ 
+  white-space:nowrap;
+  overflow:hidden;
 }
 
 /* post */
@@ -176,13 +147,13 @@
   display:none;
 }
 
-table
+#bookmark table
 {
     margin: 5px 0px 5px 0px;
     padding: 0px;
     background: #7cb4fb;
 }
-table td
+#bookmark table td
 {
     margin: 0px;
     padding: 2px;
diff -urN soojung-0.4.5/templates/asual/entry.tpl soojung/templates/asual/entry.tpl
--- soojung-0.4.5/templates/asual/entry.tpl	2005-02-15 10:15:06.000000000 +0900
+++ soojung/templates/asual/entry.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -5,17 +5,17 @@
 			<div id="clear"></div>
 			<div id="entries">
 <div class="entry">
-	<h3>{$entry->title}</h3>
+	<h3>{$entry->title|escape}</h3>
 	<div class="entrybody">
 		{$entry->getBody()}
 	</div>
 	<p>
 		<span class="blue">{$entry->date|date_format:"%B %d, %Y"}</span>
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<span>Comments [<a class="plink" href="{$entry->getHref()}#comment">{$entry->getCommentCount()}</a>]</span>
+			<span>Comments [<a class="plink" href="{$entry->getHref()|escape}#comment">{$entry->getCommentCount()}</a>]</span>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<span>Trackbacks [<a class="plink" href="{$entry->getHref()}#trackback">{$entry->getTrackbackCount()}</a>]</span>
+			<span>Trackbacks [<a class="plink" href="{$entry->getHref()|escape}#trackback">{$entry->getTrackbackCount()}</a>]</span>
 		{/if}
 	</p>
 </div>
@@ -30,11 +30,11 @@
 	<div class="trackback">
 		<a name="{$trackback->date}"></a>
 		<p class="blue">
-			Trackback from <a href="{$trackback->url}">{$trackback->url}</a>
+			Trackback from <a href="{$trackback->url|escape}">{$trackback->url|escape}</a>
 		</p>
-		<p>{$trackback->title}:</p>
+		<p>{$trackback->title|escape}:</p>
 		<p>
-			{$trackback->getExcerpt()|strip_tags}
+			{$trackback->getExcerpt()|strip_tags|escape}
 		</p>
 	</div>
 {/foreach}
@@ -51,11 +51,11 @@
 		<p class="blue">
 			Left on {$comment->date|date_format:"%B %d, %Y %I:%M %p"} by
 			{if $comment->homepage != ""}
-				<a href="{$comment->homepage}">{$comment->name}</a>
+				<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 			{elseif $comment->email != ""}
-				<a href=mailto:"{$comment->email}">{$comment->name}</a>
+				<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 			{else}
-				{$comment->name}
+				{$comment->name|escape}
 			{/if}
 		</p>
 		<p>
@@ -63,16 +63,16 @@
 		</p>
 	</div>
 {/foreach}
-	<form id="commentform" action="." method="post">
+	<form id="commentform" action="" method="post">
 		<p>
 			<input type="hidden" name="blogid" value="{$entry->entryId}" />
 		</p>
 		<p class="label">Author (<span class="red">*</span>):</p>
-		<p class="input"><input type="text" name="name" value="{$w_name}" /></p>
+		<p class="input"><input type="text" name="name" value="{$w_name|escape}" /></p>
 		<p class="label">E-mail:</p>
-		<p class="input"><input type="text" name="email" value="{$w_email}" /></p>
+		<p class="input"><input type="text" name="email" value="{$w_email|escape}" /></p>
 		<p class="label">URL:</p>
-		<p class="input"><input type="text" name="url" value="{$w_url|default:"http://"}" /></p>
+		<p class="input"><input type="text" name="url" value="{$w_url|default:"http://"|escape}" /></p>
 		<p class="label">Comment (<span class="red">*</span>):</p>
 		<p class="input"><textarea name="body" rows="5" cols="40"></textarea></p>
 		<p class="label">&nbsp;</p>
diff -urN soojung-0.4.5/templates/asual/footer.tpl soojung/templates/asual/footer.tpl
--- soojung-0.4.5/templates/asual/footer.tpl	2005-02-20 11:13:26.000000000 +0900
+++ soojung/templates/asual/footer.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -9,7 +9,7 @@
 		<li><a href="{$baseurl}/index.php">main</a></li>
 		<li><a href="{$baseurl}/admin.php">admin</a></li>
 		{foreach from=$static_entries item=static}
-		<li><a href="{$static->getHref()}">{$static->title}</a></li>
+		<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 		{/foreach}
 	</ul>
 </div>
@@ -18,7 +18,7 @@
 	<ul>
 		{foreach from=$categories item=category}
 		<li>
-			<a href="{$category->getHref()}">{$category->name}</a> 
+			<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
 			({$category->getEntryCount()})
 		</li>
 		{foreachelse}
@@ -35,7 +35,7 @@
 	<ul>
 		{foreach from=$archvies item=archive}
 		<li>
-			<a href="{$archive->getHref()}">{$archive->getDate()|date_format:"%B %Y"}</a>
+			<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
 		</li>
 		{foreachelse}
 		<li></li>
@@ -47,7 +47,7 @@
 	<ul>
 		{foreach from=$recent_entries item=entry}
 		<li>
-			<a href="{$entry->getHref()}">{$entry->title}</a>
+			<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		</li>
 		{foreachelse}
 		<li></li>
@@ -73,7 +73,7 @@
 	<ul>
 		{foreach from=$bookmarks item=bookmark}
 		<li>
-			<a href="{$bookmark->url}">{$bookmark->desc}</a>
+			<a href="{$bookmark->url|escape}">{$bookmark->desc|escape}</a>
 		</li>
 		{foreachelse}
 		<li></li>
diff -urN soojung-0.4.5/templates/asual/header.tpl soojung/templates/asual/header.tpl
--- soojung-0.4.5/templates/asual/header.tpl	2005-02-15 10:15:06.000000000 +0900
+++ soojung/templates/asual/header.tpl	2005-02-24 23:15:59.000000000 +0900
@@ -6,8 +6,9 @@
 
 	<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/asual.css" />
 	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
+	<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 </head>
-<body>
+<body onload="return correct_bbcode_image();">
 
 <div id="main">
 	<div id="header">
diff -urN soojung-0.4.5/templates/asual/index.tpl soojung/templates/asual/index.tpl
--- soojung-0.4.5/templates/asual/index.tpl	2005-02-15 10:15:06.000000000 +0900
+++ soojung/templates/asual/index.tpl	2005-03-01 02:01:20.000000000 +0900
@@ -9,34 +9,34 @@
 	{foreach from=$entries item=entry}
 
 <div class="entry">
-	<h3><a href="{$entry->getHref()}">{$entry->title}</a></h3>
+	<h3><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h3>
 	<div class="entrybody">
 	{$entry->getBody()}
 	</div>
 	<p>
 		<span class="blue">{$entry->date|date_format:"%B %d, %Y"}</span>
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<span>Comments [<a class="plink" href="{$entry->getHref()}#comment">{$entry->getCommentCount()}</a>]</span>
+			<span>Comments [<a class="plink" href="{$entry->getHref()|escape}#comment">{$entry->getCommentCount()}</a>]</span>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<span>Trackbacks [<a class="plink" href="{$entry->getHref()}#trackback">{$entry->getTrackbackCount()}</a>]</span>
+			<span>Trackbacks [<a class="plink" href="{$entry->getHref()|escape}#trackback">{$entry->getTrackbackCount()}</a>]</span>
 		{/if}
 	</p>
 </div>
 	{/foreach}
 
 	{if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 	{/if}
 	{if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 	{/if}
 
 {elseif $view == "archive"}
 	{foreach from=$entries item=entry}
 <div class="entry">
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 </div>
@@ -45,7 +45,7 @@
 	{foreach from=$entries item=entry}
 <div class="entry">
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 </div>
@@ -54,7 +54,7 @@
 	{foreach from=$entries item=entry}
 <div class="entry">
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 </div>
diff -urN soojung-0.4.5/templates/box/entry.tpl soojung/templates/box/entry.tpl
--- soojung-0.4.5/templates/box/entry.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/entry.tpl	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,72 @@
+{include file="header.tpl"}
+			<div id="entries">
+				<div class="entry">
+					<div class="entrytitle" style="color: #777777;">{$entry->title|escape}</div>
+					<div class="entrybody">{$entry->getBody()}</div>
+					<div class="entrydate">
+						posted at {$entry->date|date_format:"%y/%m/%d %H:%M"}
+						| <a class="plink" href="{$entry->category->getHref()|escape}">{$entry->category->name|escape}</a>
+						{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="#none" onclick="return fold_sidebar('div_CO_{$entry->entryId}');">Comments ({$entry->getCommentCount()})</a>{/if}
+{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="#none" onclick="return fold_sidebar('div_TB_{$entry->entryId}');">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
+					</div>
+					{if $entry->isSetOption("NO_TRACKBACK") == false}
+					<div id="div_TB_{$entry->entryId}" style="text-align:left;">
+						<div class="graybox">
+							<div class="gray8" style="text-align:right; padding: 5px;">
+								&nbsp;Track this back : <span style="font-size:7pt;" onclick="copy_clip(this.innerHTML);" onMouseOver="this.style.cursor='pointer';">{$baseurl}/trackback.php?blogid={$entry->entryId}</span>
+							</div>
+							{foreach from=$trackbacks item=trackback}
+							<div class="blue8" style="width: 100%; margin: 5px 5px 0 0; color: #999999;">
+								<img src="{$baseurl}/templates/{$skin}/imgs/comment.gif" alt="" /> Tracked from <a href="{$trackback->url|escape}" onclick="seturltarget(this,'_blank');"><b>{$trackback->name|escape}</b></a>
+								at {$trackback->date|date_format:"%y/%m/%d %H:%M"}
+							</div>
+							<div class="blue8" style="margin: 0 0 5px 15px;  color: #555555;">
+								<a href="{$trackback->url|escape}" onclick="seturltarget(this,'_blank');">{$trackback->title|escape}</a><br />
+								{$trackback->getExcerpt()|strip_tags}
+							</div>
+							{/foreach}
+						</div>
+					</div>
+					{/if}
+					{if $entry->isSetOption("NO_COMMENT") == false}
+					<div id="div_CO_{$entry->entryId}" style="text-align: left;">
+						<div class="graybox">
+							{foreach from=$comments item=comment}
+							<div class="blue8" style="margin: 5px 5px 0 0; color: #999999;">
+								<img src="{$baseurl}/templates/{$skin}/imgs/comment.gif" alt="" /> Commented by<b>
+									{if $comment->homepage != ""}
+									<a href="{$comment->homepage|escape}" onclick="seturltarget(this,'_blank');">{$comment->name|escape}</a>
+									{elseif $comment->email != ""}
+									<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
+									{else}
+									{$comment->name|escape}
+									{/if}
+								</b>
+								at {$comment->date|date_format:"%y/%m/%d %H:%M"}
+							</div>
+							<div class="blue8" style="margin: 0 0 5px 15px; color:#555555;">{$comment->getBody()}</div>
+							{/foreach}
+							<br />
+							<form action="entry.php" method="post">
+								<div class="blue8" style="text-align:right; padding:0 0 3px 0;">
+									Name <input class="comment_text" type="text" name="name" value="{$w_name|escape}" style="width: 50px;" /> &nbsp;
+									Email <input class="comment_text" type="text" name="email" value="{$w_email|escape}" style="width: 50px;" /> &nbsp;
+									Homepage <input class="comment_text" type="text" name="url" value="{$w_url|default:"http://"|escape}" style="width: 200px;" />
+								</div>
+								<div style="text-align:right;">
+									<textarea class="comment_text" name="body" rows="3" cols="" style="width: 90%; overflow-y: auto; overflow-x: hidden;"></textarea>
+								</div>
+								<div style="text-align:right; padding: 3px 0 0 0;" class="gray7">
+									<input type="hidden" name="blogid" value="{$entry->entryId}" />
+									<input type="submit" value="save" style="color:#999999; background-color:#F7F7F7; border: 1px #CCCCCC solid; width: 50px; height: 17px; overflow: auto; font-size: 8pt;" />
+								</div>
+							</form>
+						</div>
+					</div>
+					{/if}
+				</div>
+			</div>
+		</div>
+	</div>
+{include file="sidebar.tpl"}
+{include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/box/footer.tpl soojung/templates/box/footer.tpl
--- soojung-0.4.5/templates/box/footer.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/footer.tpl	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,9 @@
+	<div id="footer">
+		<p>
+			{$license_link}<br />
+			Powered by <a href="http://soojung.kldp.net">soojung {$soojung_version}</a>
+		</p>
+	</div>
+</body>
+</html>
+
diff -urN soojung-0.4.5/templates/box/header.tpl soojung/templates/box/header.tpl
--- soojung-0.4.5/templates/box/header.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/header.tpl	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>{$title}</title>
+<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
+<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
+<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/skin.css" />
+<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
+<script type="text/javascript" src="{$baseurl}/templates/{$skin}/javascript.js"></script>
+
+</head>
+<body onload="on_load();">
+<div id="bg">
+	<div id="leftbox" class="blackbox">
+		<div id="main">
+			<div id="header">
+				<div style="text-align:right;" class="silver8">
+					<a href="{$baseurl}/admin.php" class="silver7">admin</a>
+				</div>
+				<div class="blogtitle" style="font-size: 18pt;">
+					<a href="{$baseurl}" title="{$description}">{$title}</a> &nbsp; <a href="{$baseurl}/rss2.php" onclick="seturltarget(this,'_blank');"><img src="{$baseurl}/templates/{$skin}/imgs/xml.gif" alt=""/></a>
+				</div>
+				<div class="blogdesc">{$description}</div>
+			</div>
+
Binary files soojung-0.4.5/templates/box/imgs/bg.gif and soojung/templates/box/imgs/bg.gif differ
Binary files soojung-0.4.5/templates/box/imgs/comment.gif and soojung/templates/box/imgs/comment.gif differ
Binary files soojung-0.4.5/templates/box/imgs/css.png and soojung/templates/box/imgs/css.png differ
Binary files soojung-0.4.5/templates/box/imgs/rss-949.png and soojung/templates/box/imgs/rss-949.png differ
Binary files soojung-0.4.5/templates/box/imgs/rss20_logo.gif and soojung/templates/box/imgs/rss20_logo.gif differ
Binary files soojung-0.4.5/templates/box/imgs/wai_a.png and soojung/templates/box/imgs/wai_a.png differ
Binary files soojung-0.4.5/templates/box/imgs/xhtml11.png and soojung/templates/box/imgs/xhtml11.png differ
Binary files soojung-0.4.5/templates/box/imgs/xml.gif and soojung/templates/box/imgs/xml.gif differ
diff -urN soojung-0.4.5/templates/box/index.tpl soojung/templates/box/index.tpl
--- soojung-0.4.5/templates/box/index.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/index.tpl	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,119 @@
+{include file="header.tpl"}
+			<div id="entries">
+				{if $view == "index"}
+				{foreach from=$entries item=entry}
+				<div class="entry">
+					<div class="entrytitle"><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></div>
+					<div class="entrybody">{$entry->getBody()}</div>
+					<div class="entrydate">
+						<a class="plink" href="{$entry->getHref()|escape}">posted at {$entry->date|date_format:"%y/%m/%d %H:%M"}</a>
+						| <a class="plink" href="{$entry->category->getHref()|escape}">{$entry->category->name|escape}</a>
+						{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="#none" onclick="return fold_sidebar('div_CO_{$entry->entryId}');">Comments ({$entry->getCommentCount()})</a>{/if}
+						{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="#none" onclick="return fold_sidebar('div_TB_{$entry->entryId}');">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
+					</div>
+					{if $entry->isSetOption("NO_TRACKBACK") == false}
+					<div id="div_TB_{$entry->entryId}" style="text-align:left;" class="div_hide">
+						<div class="graybox">
+							<div class="gray8" style="text-align:right; padding: 5px;">
+								&nbsp;Track this back : <span style="font-size:7pt;" onclick="copy_clip(this.innerHTML);" onMouseOver="this.style.cursor='pointer';">{$baseurl}/trackback.php?blogid={$entry->entryId}</span>
+							</div>
+							{foreach from=$entry->getTrackbacks() item=trackback}
+							<div class="blue8" style="width: 100%; margin: 5px 5px 0 0; color: #999999;">
+								<img src="{$baseurl}/templates/{$skin}/imgs/comment.gif" alt="" /> Tracked from <a href="{$trackback->url|escape}" onclick="seturltarget(this,'_blank');"><b>{$trackback->name|escape}</b></a>
+								at {$trackback->date|date_format:"%y/%m/%d %H:%M"}
+							</div>
+							<div class="blue8" style="margin: 0 0 5px 15px;  color: #555555;">
+								<a href="{$trackback->url|escape}" onclick="seturltarget(this,'_blank');">{$trackback->title|escape}</a><br />
+								{$trackback->getExcerpt()|strip_tags|escape}
+							</div>
+							{/foreach}
+						</div>
+					</div>
+					{/if}
+					{if $entry->isSetOption("NO_COMMENT") == false}
+					<div id="div_CO_{$entry->entryId}" style="text-align: left;" class="div_hide">
+						<div class="graybox">
+							{foreach from=$entry->getComments() item=comment}
+							<div class="blue8" style="margin: 5px 5px 0 0; color: #999999;">
+								<img src="{$baseurl}/templates/{$skin}/imgs/comment.gif" alt="" /> Commented by<b>
+									{if $comment->homepage != ""}
+									<a href="{$comment->homepage|escape}" onclick="seturltarget(this,'_blank');">{$comment->name|escape}</a>
+									{elseif $comment->email != ""}
+									<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
+									{else}
+									{$comment->name|escape}
+									{/if}
+								</b>
+								at {$comment->date|date_format:"%y/%m/%d %H:%M"}
+							</div>
+							<div class="blue8" style="margin: 0 0 5px 15px; color:#555555;">{$comment->getBody()}</div>
+							{/foreach}
+							<br />
+							<form action="entry.php" method="post">
+								<div class="blue8" style="text-align:right; padding:0 0 3px 0;">
+									Name <input class="comment_text" type="text" name="name" value="{$w_name|escape}" style="width: 50px;" /> &nbsp;
+									Email <input class="comment_text" type="text" name="email" value="{$w_email|escape}" style="width: 50px;" /> &nbsp;
+									Homepage <input class="comment_text" type="text" name="url" value="{$w_url|default:"http://"|escape}" style="width: 200px;" />
+								</div>
+								<div style="text-align:right;">
+									<textarea class="comment_text" name="body" rows="3" cols="" style="width: 90%; overflow-y: auto; overflow-x: hidden;"></textarea>
+								</div>
+								<div style="text-align: right; padding: 3px 0 0 0;" class="gray7">
+									<input type="hidden" name="blogid" value="{$entry->entryId}" />
+									<input type="submit" value="save" style="color:#999999; background-color:#F7F7F7; border: 1px #CCCCCC solid; width: 50px; height: 17px; overflow: auto; font-size: 8pt;" />
+								</div>
+							</form>
+						</div>
+					</div>
+					{/if}
+				</div>
+				{/foreach}
+				<div class="page">
+					<div class="link" style="clear:both;position:relative;float:left;text-align:left">
+						{if $prev_page_link != ""}
+						<a href="{$prev_page_link|escape}" class="link">&lt;&lt; prev</a>
+						{else}&lt;&lt; prev
+						{/if}
+					</div>
+				
+					<div class="link" style="position:relative;float:right;text-align:right">
+						{if $next_page_link != ""}
+						<a href="{$next_page_link|escape}" class="link">next &gt;&gt;</a>
+						{else}
+						next &gt;&gt; 
+						{/if}
+					</div>
+				</div>
+
+				{elseif $view == "archive"}
+				<div class="graybox">
+					{foreach from=$entries item=entry}
+					<font style="font-size: 8pt;">{$entry->date|date_format:"%y/%m/%d"}</font>
+					&nbsp;<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+					<br />
+					{/foreach}
+				</div>
+				
+				{elseif $view == "category"}
+				<div class="graybox">
+					{foreach from=$entries item=entry}
+					<font style="font-size: 8pt;">{$entry->date|date_format:"%y/%m/%d"}</font>
+					&nbsp;<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+					<br />
+					{/foreach}
+				</div>
+				{elseif $view == "search"}
+				<div class="graybox">
+					{foreach from=$entries item=entry}
+					<font style="font-size: 8pt;">{$entry->date|date_format:"%y/%m/%d"}</font>
+					&nbsp;<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+					<br />
+					{/foreach}
+				</div>
+				{/if}
+			</div>
+		</div>
+	</div>
+{include file="sidebar.tpl"}
+{include file="footer.tpl"}
+
diff -urN soojung-0.4.5/templates/box/javascript.js soojung/templates/box/javascript.js
--- soojung-0.4.5/templates/box/javascript.js	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/javascript.js	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,66 @@
+function on_load() {
+	objs = document.getElementsByTagName('IMG');
+	max_x=510;
+	for(i=0; i<objs.length; i++) {
+		obj = objs[i];
+		if(obj.className != 'bbcodeimg') continue;
+		img = new Image();
+		img.src = obj.src;
+		if(max_x<img.width){
+			cut=img.width/max_x;
+			obj.width = img.width/cut;
+			obj.height = img.height/cut;
+		}else{
+			obj.width = img.width;
+			obj.height = img.height;
+		}
+	}
+	return false;
+}
+
+function seturltarget(link, target) {
+	link.target = target;
+	return true;
+}
+
+function moreless(obj) {
+	obj.innerHTML=(obj.nextSibling.style.display=='none')?'LESS':'MORE';
+	obj.nextSibling.style.display=(obj.nextSibling.style.display=='none')?'block':'none';
+}
+
+function copy_clip(copyText){
+	if(window.clipboardData){ // IE
+		window.clipboardData.setData('Text',copyText);
+	}
+	else if (window.netscape){ // Mozilla
+		netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+          
+		// Store support string in an object.
+		var str = 
+			Components.classes["@mozilla.org/supports-string;1"]
+			.createInstance(Components.interfaces.nsISupportsString);
+		if (!str) return false;
+		str.data=copyText;
+          
+		// Make transferable.
+		var trans = 
+			Components.classes["@mozilla.org/widget/transferable;1"]
+			.createInstance(Components.interfaces.nsITransferable);
+		if (!trans) return false;
+          
+		// Specify what datatypes we want to obtain, which is text in this case.
+		trans.addDataFlavor("text/unicode");
+		trans.setTransferData("text/unicode",str,copyText.length*2);
+          
+		var clipid=Components.interfaces.nsIClipboard;
+		var clip =
+			Components.classes["@mozilla.org/widget/clipboard;1"]
+			.getService(clipid);
+		if (!clip) return false;
+          
+		clip.setData(trans,null,clipid.kGlobalClipboard);
+	}
+	alert("Copied into a ClipBoard");
+	return false;
+}
+
diff -urN soojung-0.4.5/templates/box/sidebar.tpl soojung/templates/box/sidebar.tpl
--- soojung-0.4.5/templates/box/sidebar.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/sidebar.tpl	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,122 @@
+	<div id="sidebar" class="blackbox">
+		<div style="text-align: center;">
+			<i>your message goes here.</i>
+		</div>
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_category');"> &nbsp;CATEGORY</a></div>
+		<ul id="div_category">
+			{foreach from=$categories item=category}
+			<li>
+				<a href="{$category->getHref()|escape}">{$category->name|substring:25|escape}</a>
+				({$category->getEntryCount()})
+			</li>
+			{foreachelse}
+			<li></li>
+			{/foreach}
+		</ul>
+
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_calendar');"> &nbsp;CALENDAR</a></div>
+		<div id="div_calendar" style="text-align:center;">
+			{$calendar->getCalendar()}
+		</div>
+<!--
+		{if count($static_entries) != 0}
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_static');"> &nbsp;static POST</a></div>
+		<ul id="div_static">
+			{foreach from=$static_entries item=static}
+			<li>
+				<a href="{$static->getHref()|escape}">{$static->title|escape}</a>
+			</li>
+			{foreachelse}
+			<li></li>
+			{/foreach}
+		</ul>
+		{/if}
+-->
+<!--
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_entry');"> &nbsp;recent POST</a></div>
+		<ul id="div_entry" class="hide">
+			{foreach from=$recent_entries item=entry}
+			<li>
+				<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+			</li>
+			{foreachelse}
+			<li></li>
+			{/foreach}
+		</ul>
+-->
+		{if count($recent_comments) != 0}
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_recent_comment');"> &nbsp;recent COMMENTs</a></div>
+		<ul id="div_recent_comment" class="hide">
+			{foreach from=$recent_comments item=comment}
+			<li>
+				<a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false|substring:35|escape}</a>
+			</li>
+			{/foreach}
+		</ul>
+		{/if}
+				
+		{if count($recent_trackbacks) != 0}
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_recent_trackback');"> &nbsp;recent TRACKBACKs</a></div>
+		<ul id="div_recent_trackback" class="hide">
+			{foreach from=$recent_trackbacks item=trackback}
+			<li>
+				<a href="{$trackback->getHref()|escape}">{$trackback->url|substring:27|escape}</a>
+			</li>
+			{/foreach}
+		</ul>
+		{/if}
+
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_archive');"> &nbsp;ARCHIVEs</a></div>
+		<ul id="div_archive">
+			{foreach from=$archvies item=archive}
+			<li>
+				<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"|substring:25}</a> ({$archive->getEntryCount()})
+			</li>
+			{foreachelse}
+			<li></li>
+			{/foreach}
+		</ul>
+
+		{if count($recent_referers) != 0}
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_recent_referer');"> &nbsp;recent REFERERs</a></div>
+		<ul id="div_recent_referer" class="hide">
+			{foreach from=$recent_referers item=referer}
+			<li>
+				<a href="{$referer|escape}" onclick="seturltarget(this,'_blank');">{$referer|substring:25|escape}</a>
+			</li>
+			{/foreach}
+		</ul>
+		{/if}
+
+		{if count($bookmarks) != 0}
+		<div class="menutitle"><a href="#none" onclick="return fold_sidebar('div_bookmark');"> &nbsp;BOOKMARKs</a></div>
+		<ul id="div_bookmark" class="hide">
+			{foreach from=$bookmarks item=bookmark}
+			<li>
+				<a href="{$bookmark->url|escape}" onclick="seturltarget(this,'_blank');">{$bookmark->desc|substring:35|escape}</a>
+			</li>
+			{/foreach}
+		</ul>
+		{/if}
+
+		<div class="menutitle" style="color: #777777;"> &nbsp;SEARCH</div>
+		<form action="index.php" method="get">
+			<p style="margin-left:10px;">
+				<input type="text" name="search" title="input search text" size="16"/>
+				<input type="submit" value="Search" />
+			</p>
+		</form>
+		<br />
+		<p style="margin-left: 10px;">
+			Today : {$today_count}<br />
+			Total : {$total_count}<br />
+			<br />
+			<a href="{$baseurl}/rss2.php" onclick="seturltarget(this,'_blank');"><img src="{$baseurl}/templates/{$skin}/imgs/rss20_logo.gif" alt="rss 2.0 feed" style="border:0px;"/></a><br />
+			
+			<a href="http://validator.w3.org/check?uri=referer" onclick="seturltarget(this,'_blank');"><img src="{$baseurl}/templates/{$skin}/imgs/xhtml11.png" alt="Valid XHTML 1.0!" style="border:0px;"/></a><br />
+
+			<a class="nodecoration" title="Explanation of Level A Conformance" href="http://www.w3.org/WAI/WCAG1A-Conformance" onclick="seturltarget(this,'_blank');"><img src="{$baseurl}/templates/{$skin}/imgs/wai_a.png" alt="Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" style="border:0px;"/></a>
+		</p>
+	</div>
+</div>
+
diff -urN soojung-0.4.5/templates/box/skin.css soojung/templates/box/skin.css
--- soojung-0.4.5/templates/box/skin.css	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/skin.css	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,142 @@
+.moreless {
+	background-color: #F7F7F7;
+	border:1px solid #CCCCCC;
+	margin-top: 0;
+	padding: 0;
+	padding: 5px;
+}
+
+.graybox {
+	background-color: #F7F7F7;
+	border:1px solid #CCCCCC;
+	margin-top: 15px;
+	padding: 0;
+	padding: 5px;
+}
+
+.blackbox {
+	border: 1px solid #AAAAAA;
+	padding: 0;
+	width: 100%;
+}
+
+.blogtitle {
+	font-family:Trebuchet MS,helvetica,verdana,tahoma,����;
+	font-size:18pt;
+	color: #000000;
+	margin-bottom: 5px;
+	text-align: left;
+}
+.blogtitle a:link { color:#000000; }
+.blogtitle a:visited { color:#000000; }
+.blogtitle a:hover { color:#000000; text-decoration:none; }
+.blogdesc {
+	font-family:Trebuchet MS,helvetica,verdana,tahoma,����;
+	font-size:10pt;
+	color: #999999;
+	text-align: left;
+}
+.entrytitle{
+	font-weight: bold;
+	font-size: 10pt;
+	margin-bottom: 10px;	
+}
+.entrybody{
+}
+
+.entrydate {
+	text-align: right;
+	margin-top: 20px;
+	border-top: 1px dotted #CCCCCC;
+	font-size: 8pt;
+	color: #999999;
+}
+
+.menutitle { 
+	line-height:17px; 
+	font-size:8pt; 
+	font-weight:bold; 
+	background-color: #F7F7F7;
+	color:#999999; 
+	border:1px solid #DDDDDD;
+	margin-top:15px;
+	margin-bottom:3px;
+	font-family:georgia,verdana,tahoma,����;
+}
+.menucontent { 
+	margin-top:5px;
+}
+
+.comment_text {
+	font-size:8pt;
+	padding-top:2px;
+	border:solid 1px #CCCCCC;
+	background-color:#FFFFFF;
+	color:#555555;
+}	
+
+.search { 
+	border:solid 1px #CCCCCC; 
+	font-size:8pt; 
+	color:#555555; 
+	background-color:#FFFFFF; 
+}
+
+.link { 
+	font-family:tahoma;
+	font-size:8pt; 
+	color:#999999;
+}
+a.link:link { color:#000000; }
+a.link:visited { color:#000000; }
+a.link:hover { color:#999999; text-decoration:none; }
+.link2 { 
+	font-family:tahoma;
+	font-size:8pt; 
+	color:#000000;
+}
+a.link2:link { color:#999999; }
+a.link2:visited { color:#999999; }
+a.link2:hover { color:#000000; text-decoration:none; }
+
+.silver7 { 
+	font-size:7pt; 
+	color:#CECBCE; 
+}
+.silver7 a:link { color:#CECBCE; }
+.silver7 a:visited { color:#CECBCE; }
+.silver7 a:hover { color:#777777; text-decoration:none; }
+
+.silver8 {
+	font-size: 8pt;
+	color: #CECBCE;
+}
+.silver8 a:link { color:#CECBCE; }
+.silver8 a:visited { color:#CECBCE; }
+.silver8 a:hover { color:#777777; text-decoration:none; }
+
+.gray7 { 
+	font-size:7pt; 
+	color:#999999; 
+}
+.gray7 a:link { color:#999999; }
+.gray7 a:visited { color:#999999; }
+.gray7 a:hover { color:#999999; }
+
+.gray8 { 
+	font-size:8pt; 
+	color:#999999; 
+}
+.gray8 a:link { color:#999999; }
+.gray8 a:visited { color:#999999; }
+.gray8 a:hover { color:#999999; }
+
+.blue8 { 
+	color:#777777; 
+	font-size:8pt;
+}
+.blue8 a:link { color:#3399CC; }
+.blue8 a:visited { color:#3399CC; }
+.blue8 a:hover { color:#777777; text-decoration:none; }
+
+
diff -urN soojung-0.4.5/templates/box/styles.css soojung/templates/box/styles.css
--- soojung-0.4.5/templates/box/styles.css	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/box/styles.css	2005-03-11 23:16:42.000000000 +0900
@@ -0,0 +1,184 @@
+body,td {
+	font-size:8pt;
+	font-family: verdana,tahoma,����;
+	line-height:150%;
+	background-color: #F7F7F7;
+	text-align: center;
+}
+
+pre
+{
+  padding: 5px;
+  border: 1px solid #EBD4C8;
+  background-color: #FCF7F4;
+}
+
+#bg {
+	padding: 0;
+	border: 0;
+	width: 800px;
+	border-spacing: 0px;
+	text-align: center;
+	margin: 20px auto;
+}
+
+#leftbox {
+	max-width: 590px;
+	width: 590px;
+	text-align: center;
+	background-color: #FFFFFF;
+	float: left;
+	padding-bottom: 5px;
+}
+
+#main {
+	margin: auto;
+	width: 90%;
+	text-align:left;
+}
+
+#header {
+	width: 100%;
+	background-color: #FFFFFF;
+	padding-bottom: 10px;
+}
+
+#entries {
+	background-color: #FFFFFF;
+}
+#entries .entry {
+	padding-top: 5px;
+	padding-bottom: 10px;
+	border-top: 1px solid #AAAAAA;
+}
+#entries .page {
+	border-top: 1px solid #AAAAAA;
+}
+
+#sidebar {
+	width: 200px;
+	background-color: #FFFFFF;
+	text-align: left;
+	float: right;
+	vertical-align: top;
+}
+	   
+#sidebar ul {
+	margin: 0px 5px 5px 5px;
+	padding: 0px 4px;
+	list-style: none;
+}
+#sidebar li {
+	width: 100%;
+	margin: 0px 0px 5px 0px;
+	white-space: nowrap;
+	overflow: hidden;
+}
+#sidebar p {
+	margin: 10px;
+}
+#sidebar p.addition {
+	font-size: 0.7em;
+}
+#sidebar p.addition img {
+	border: 0px !important;
+	vertical-align: middle;
+}
+#footer
+{
+  position: relative;
+  clear: both;
+  margin: 0;
+  padding: 0;
+  font-size: 90%;
+  color: #666;
+}
+
+#footer p 
+{
+  color: #999;
+  margin: 0;
+  padding: 8px 20px;
+  text-align: center;
+}
+#calendar
+{
+  margin: 0px;
+  background-color: #FFFFFF;
+}
+
+#calendar p
+{
+  text-align: center;
+  margin: 0px;
+}
+
+#calendar p .current
+{
+  font-size: 11px;
+  font-weight: bold;
+}
+
+#calendar table
+{
+  margin: 0px auto;
+  width: 85%;
+  font-size: 10px;
+  table-layout: fixed;
+  border-collapse: collapse;
+}
+
+#calendar th, #calendar td
+{
+  text-align: center;
+  font-size: 10px;
+  width: 14.3%;
+  margin: 0px;
+  padding: 2px;
+  background-color: #FFFFFF;
+}
+
+#calendar td
+{
+  color: #888;
+}
+
+#calendar table a
+{
+  font-weight: bold;
+  border-bottom: dotted 1px #888;
+}
+
+hr {
+	color: #CECBCE;
+	margin-top: 10px;
+}
+input, textarea, select {
+	font: 100% 'Lucida Sans Unicode', 'Lucida Grande', 'Bitstream Vera Sans', 'Trebuchet MS', Geneva, Arial, sans-serif;
+}
+input.text {
+	border: 1px solid #285090;
+}
+
+body, div, p, img, ul, li, h1, h2, h3, h4, h5, h6, form {
+	margin: 0;
+	padding: 0;
+	border: 0;
+}
+
+img {
+	border-width: 0;
+	max-width: 100%;
+	height: auto;
+}
+
+.div_hide
+{
+  display: none;
+}
+
+.hide { display: none; }
+
+A:link { color:#777777; text-decoration:none; }
+A:visited { color:#777777; text-decoration:none; }
+A:hover { color:#000000; text-decoration:underline; }
diff -urN soojung-0.4.5/templates/bruise2/entry.tpl soojung/templates/bruise2/entry.tpl
--- soojung-0.4.5/templates/bruise2/entry.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/bruise2/entry.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -0,0 +1,60 @@
+{include file="header.tpl"}
+
+<div class="entry">
+<h2>{$entry->title|escape}</h2>
+{$entry->getBody()}
+<p class="posted">{$entry->date|date_format:"%B %d, %Y %I:%M %p"}</p>
+</div>
+
+{if $entry->isSetOption("NO_TRACKBACK") == false}
+<div class="trackbacks">
+<div class="trackback_url">TrackBack URL: {$baseurl}/trackback.php?blogid={$entry->entryId}</div>
+<a name="trackback"></a>
+{foreach from=$trackbacks item=trackback}
+	<div class="trackback">
+	<a name="{$trackback->date}"></a>
+	<a href="{$trackback->url|escape}">{$trackback->url|escape}</a><br />
+	{$trackback->title|escape}<br />
+	{$trackback->getExcerpt()|strip_tags|escape}
+	</div>
+{/foreach}
+</div>
+{/if}
+
+{if $entry->isSetOption("NO_COMMENT") == false}
+<div class="comments">
+{$entry.comment_count} Comments<br />
+<a name="comment"></a>
+{foreach from=$comments item=comment}
+	<div class="comment">
+	<a name="{$comment->date}"></a>
+	On {$comment->date|date_format:"%B %d, %Y %I:%M %p"}, 
+	{if $comment->homepage != ""}
+		<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
+	{elseif $comment->email != ""}
+		<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
+	{else}
+		{$comment->name}
+	{/if}
+	said: <br />
+	{$comment->getBody()}
+	</div>
+{/foreach}
+</div>
+
+<form action="" method="post">
+Post a comment<br />
+Name:<br />
+<input type="text" name="name" value="{$w_name|escape}"><br />
+Email Adress:<br />
+<input type="text" name="email" value="{$w_email|escape}"><br />
+URL:<br />
+<input type="text" name="url" value="{$w_url|default:"http://"|escape}"><br />
+Comments:<br />
+<textarea name="body" rows="5" cols="40"></textarea><br />
+<input type="hidden" name="blogid" value="{$entry->entryId}">
+<input type="submit" value="Post">
+</form>
+{/if}
+
+{include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/bruise2/footer.tpl soojung/templates/bruise2/footer.tpl
--- soojung-0.4.5/templates/bruise2/footer.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/bruise2/footer.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -0,0 +1,149 @@
+</div>
+
+</td>
+</tr>
+<div id="footer">
+<tr>
+	<td colspan="2">
+		<table border="0" cellpadding="0" cellspacing="0" width="100%">
+		<tr>
+			<td align="left">
+				<a href="/blog/post.php"><img src="{$baseurl}/templates/bruise/imgs/ico_edit.gif"></a>
+				<a href="/blog/admin.php"><img src="{$baseurl}/templates/bruise/imgs/ico_admin.gif"></a>
+				<a href="#none" onclick="return fold_sidebar('sidebar');"><img src="{$baseurl}/templates/bruise/imgs/ico_menu.gif"></a>
+			</td>
+			<td align="right">
+				<a href="http://soojung.kldp.net">수정</a>을 씁니다.
+			</td>
+		</tr>
+		</table>
+	</td>
+</tr>
+</div>
+</table>
+</td><td valign="top" width="250">
+<div id="sidebar">
+<h3><a href="#none" onclick="return fold_sidebar('div_calendar');">Calendar</a></h3>
+<div id="div_calendar">
+	<li>{$calendar->getCalendar()}</li>
+</div>
+
+<h3><a href="#none" onclick="return fold_sidebar('div_category');">Categories</a></h3>
+<ul id="div_category">
+{foreach from=$categories item=category}
+	<li>
+		<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
+		({$category->getEntryCount()})
+	</li>
+{foreachelse}
+	<li></li>
+{/foreach}
+</ul>
+
+<h3><a href="#none" onclick="return fold_sidebar('div_archive');">Archives</a></h3>
+<ul id="div_archive" class="div_hide">
+{foreach from=$archvies item=archive}
+	<li>
+		<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
+	</li>
+{foreachelse}
+	<li></li>
+{/foreach}
+</ul>
+
+<h3><a href="#none" onclick="return fold_sidebar('div_recent_entry');">Recent Entries</a></h3>
+<ul id="div_recent_entry" class="div_hide">
+{foreach from=$recent_entries item=entry}
+	<li>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+	</li>
+{foreachelse}
+	<li></li>
+{/foreach}
+</ul>
+
+{if count($recent_comments) != 0}
+<h3><a href="#none" onclick="return fold_sidebar('div_recent_comment');">Recent Comments</a></h3>
+<ul id="div_recent_comment" class="div_hide">
+{foreach from=$recent_comments item=comment}
+	<li>
+		<a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false|escape}</a>
+	</li>
+{/foreach}
+</ul>
+{/if}
+
+{if count($recent_trackbacks) != 0}
+<h3><a href="#none" onclick="return fold_sidebar('div_recent_trackback');">Recent TrackBacks</a></h3>
+<ul id="div_recent_trackback" class="div_hide">
+{foreach from=$recent_trackbacks item=trackback}
+	<li>
+		<a href="{$trackback->getHref()|escape}">{$trackback->url|escape}</a>
+	</li>
+{/foreach}
+</ul>
+{/if}
+
+{if count($recent_referers) != 0}
+<h3><a href="#none" onclick="return fold_sidebar('div_recent_referer');">Recent Referers</a></h3>
+<ul id="div_recent_referer" class="div_hide">
+{foreach from=$recent_referers item=referer}
+	<li>
+		<a href="{$referer}">{$referer}</a>
+	</li>
+{/foreach}
+</ul>
+{/if}
+
+{if count($bookmarks) != 0}
+<h3><a href="#none" onclick="return fold_sidebar('div_bookmark');">Bookmarks</a></h3>
+<ul id="div_bookmark" class="div_hide">
+{foreach from=$bookmarks item=bookmark}
+	<li>
+		<a href="{$bookmark->url|escape}">{$bookmark->desc|escape}</a>
+	</li>
+{foreachelse}
+	<li></li>
+{/foreach}
+</ul>
+{/if}
+
+<h3>Search</h3>
+<form action="index.php" method="get">
+<p>
+<input type="text" name="search" title="input search text" size="16"/>
+<input type="submit" value="Search" />
+</p>
+</form>
+
+<p>
+Today : {$today_count}<br />
+Total : {$total_count}<br />
+</p>
+
+<a href="{$baseurl}/rss2.php">
+<img src="{$baseurl}/templates/simple/imgs/rss20_logo.gif" alt="rss 2.0 feed" style="border:0px;"/>
+</a>
+
+<br />
+
+<a href="http://validator.w3.org/check?uri=referer">
+<img src="{$baseurl}/templates/simple/imgs/xhtml11.png" alt="Valid XHTML 1.0!" style="border:0px;"/>
+</a>
+
+<br />
+
+<a class="nodecoration" title="Explanation of Level A Conformance" href="http://www.w3.org/WAI/WCAG1A-Conformance">
+<img src="{$baseurl}/templates/simple/imgs/wai_a.png" alt="Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" style="border:0px;"/>
+</a>
+<br />
+
+<p>
+{$license_link}
+</p>
+</div>
+</td></tr>
+</table>
+
+</body>
+</html>
diff -urN soojung-0.4.5/templates/bruise2/header.tpl soojung/templates/bruise2/header.tpl
--- soojung-0.4.5/templates/bruise2/header.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/bruise2/header.tpl	2005-02-24 23:16:00.000000000 +0900
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<title>{$title}</title>
+<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
+<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
+<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
+<body onload="return correct_bbcode_image();">
+<table border="0" align="center" cellpadding="0" cellspacing="0">
+<tr><td valign="top">
+<table border="0" align="center" cellpadding="0" cellspacing="0" width="640">
+<div id="header">
+<tr>
+	<td width="320" align="left">■ <a href="{$baseurl}" title="{$description}"><span class="blogTitle"><b>{$title}</b></span></a></td>
+	<td width="320" align="right">
+	| <a href="{$baseurl}">main</a> |
+	<a href="{$baseurl}/admin.php">admin</a> |
+	</td>
+</tr>
+</div>
+<tr>
+	<td colspan="2">
+<div id="content">
Binary files soojung-0.4.5/templates/bruise2/imgs/ico_admin.gif and soojung/templates/bruise2/imgs/ico_admin.gif differ
Binary files soojung-0.4.5/templates/bruise2/imgs/ico_edit.gif and soojung/templates/bruise2/imgs/ico_edit.gif differ
Binary files soojung-0.4.5/templates/bruise2/imgs/ico_menu.gif and soojung/templates/bruise2/imgs/ico_menu.gif differ
Binary files soojung-0.4.5/templates/bruise2/imgs/rss20_logo.gif and soojung/templates/bruise2/imgs/rss20_logo.gif differ
Binary files soojung-0.4.5/templates/bruise2/imgs/wai_a.png and soojung/templates/bruise2/imgs/wai_a.png differ
Binary files soojung-0.4.5/templates/bruise2/imgs/xhtml11.png and soojung/templates/bruise2/imgs/xhtml11.png differ
diff -urN soojung-0.4.5/templates/bruise2/index.tpl soojung/templates/bruise2/index.tpl
--- soojung-0.4.5/templates/bruise2/index.tpl	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/bruise2/index.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -0,0 +1,42 @@
+{include file="header.tpl"}
+
+{if $view == "index"}
+	{foreach from=$entries item=entry}
+		<div class="entry">
+		<h2><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h2>
+		{$entry->getBody()}
+		<p class="posted">
+			<a class="plink" href="{$entry->getHref()|escape}">{$entry->date|date_format:"%B %d, %Y"}</a>
+			{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
+			{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()|escape}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
+
+		</p>
+		</div>
+	{/foreach}
+	{if $prev_page_link != ""}
+		<a href="{$prev_page_link|escape}">prev</a>
+	{/if}
+	{if $next_page_link != ""}
+		<a href="{$next_page_link|escape}">next</a>
+	{/if}
+{elseif $view == "archive"}
+	{foreach from=$entries item=entry}
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+		{$entry->date|date_format:"%B %d, %Y"}
+		<br />
+	{/foreach}
+{elseif $view == "category"}
+	{foreach from=$entries item=entry}
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+		{$entry->date|date_format:"%B %d, %Y"}
+		<br />
+	{/foreach}
+{elseif $view == "search"}
+	{foreach from=$entries item=entry}
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
+		{$entry->date|date_format:"%B %d, %Y"}
+		<br />
+	{/foreach}
+{/if}
+
+{include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/bruise2/styles.css soojung/templates/bruise2/styles.css
--- soojung-0.4.5/templates/bruise2/styles.css	1970-01-01 09:00:00.000000000 +0900
+++ soojung/templates/bruise2/styles.css	2005-02-24 10:51:49.000000000 +0900
@@ -0,0 +1,228 @@
+body
+{
+  font-family: sans-serif;
+  font-size: .75em;
+  color: #FFF;
+  background: #285577;
+  line-height: 1.5em;
+  text-align: center;
+  margin: 20px auto 20px auto;
+}
+
+#content
+{
+  width: 640px;
+  background-color: #4C7899;
+  margin: 5px auto 5px auto;
+  border: 1px solid #8AB;
+  padding: 10px 10px 10px 10px;
+  text-align: left;
+}
+
+#content .entry
+{
+  padding-top: 12px;
+  border-bottom: 1px dashed white;
+}
+
+#content .comments
+{ 
+  margin-top: 12px;
+  padding: 10px;
+  background-color: #0093a3;
+  border: solid 2px #a1b1c2;
+}
+
+#content .comment
+{
+  margin-bottom: 12px;
+  padding: 10px;
+  border: solid 1px #a1b1c2;
+  background-color: #0089a3;
+}
+
+#content .trackbacks
+{
+  margin-top: 12px;
+  padding: 10px;
+  background-color: #00a2b1;
+  border: solid 2px #a1b1c2;
+}
+
+#content .trackback_url
+{
+}
+
+#content .trackback
+{ 
+  padding-bottom: 12px;
+}
+
+#content form
+{
+  margin-top: 12px;
+  padding: 10px;
+  background-color: #00899d;
+  border: solid 2px #a1b1c2;
+}
+
+h2
+{
+  font-family: "lucida grande", verdana, sans-serif;
+  font-size: 105%;
+  color: #fff;
+  padding: 0;
+  margin: 0 0 1em 0;
+}
+
+a
+{
+  color: #CCCCFF;
+  text-decoration:none;
+}
+a:link { color: #CCCCFF; }
+a:visited { color: #CCCCFF; }
+
+pre
+{
+  padding: 5px;
+  border: 1px solid #EBD4C8;
+  background-color: #FCF7F4;
+}
+
+#sidebar
+{
+  font-size: 90%;
+  line-height: 1.5em;
+  padding: 20px 20px 20px 20px;
+  color: #FFF;
+}
+
+#sidebar ul
+{
+  margin: 4px 0 20px 0;
+  padding-left: 10px;
+  list-style: none;
+}
+
+#sidebar li
+{
+  width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  margin: 0 0 .5em 0;
+}
+
+#sidebar #div_category {
+  padding-top: 10px;
+  padding-right: 10px;
+  background-color: #4C7899;
+  border: 1px solid #8AB;
+}
+
+#sidebar #div_archive {
+  padding-top: 10px;
+  padding-right: 10px;
+  background-color: #4C7899;
+  border: 1px solid #8AB;
+}
+
+#sidebar #div_recent_entry {
+  padding-top: 10px;
+  padding-right: 10px;
+  background-color: #4C7899;
+  border: 1px solid #8AB;
+}
+
+#sidebar #div_recent_comment {
+  padding-top: 10px;
+  padding-right: 10px;
+  background-color: #4C7899;
+  border: 1px solid #8AB;
+}
+
+#sidebar #div_recent_referer {
+  padding-top: 10px;
+  padding-right: 10px;
+  background-color: #4C7899;
+  border: 1px solid #8AB;
+}
+
+#sidebar .div_hide
+{
+  display: none;
+}
+
+.div_hide
+{
+  display: none;
+}
+
+#footer
+{
+}
+
+#footer p 
+{
+}
+
+#header {
+  text-decoration: none;
+}
+
+.blogTitle {
+  font-size: 1.2em;
+  color: #FFF;
+}
+
+.blogTitle a {
+  text-decoration: none;
+}
+
+img {
+  margin: 0 1px 0 0;
+  border: 0;
+}
+
+hr {
+  border: 0px;
+  border-bottom: 1px dashed white;
+}
+
+#calendar
+{
+  margin: 10px;
+}
+
+#calendar p
+{
+  text-align: center;
+  margin: 0px;
+}
+
+#calendar p .current
+{
+  font-weight: bold;
+}
+
+#calendar table
+{
+  margin: 0px auto;
+  width: 95%;
+  table-layout: fixed;
+  border-collapse: collapse;
+}
+
+#calendar th, #calendar td
+{
+  text-align: center;
+  width: 14.3%;
+  margin: 0px;
+  padding: 2px;
+}
+
+#calendar table a
+{
+  font-weight: bold;
+}
+
diff -urN soojung-0.4.5/templates/ocean/entry.tpl soojung/templates/ocean/entry.tpl
--- soojung-0.4.5/templates/ocean/entry.tpl	2005-02-15 19:42:20.000000000 +0900
+++ soojung/templates/ocean/entry.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -3,7 +3,7 @@
 	<div class="entry">
 		{$entry->date|date_format:"%p %I:%M"}
 		<h3>{$entry->date|date_format:"%B %d, %Y"}</h3>
-		<h4>{$entry->title}</h4>
+		<h4>{$entry->title|escape}</h4>
 		<div class="post">
 			{$entry->getBody()}
 		</div>
@@ -12,10 +12,10 @@
 		</div>
 		<div class="links">
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<span class="commentslink"><a href="{$entry->getHref()}#comment"><span></span>Comments ({$entry->getCommentCount()})</a></span>
+			<span class="commentslink"><a href="{$entry->getHref()|escape}#comment"><span></span>Comments ({$entry->getCommentCount()})</a></span>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<span class="trackbackslink"><a href="{$entry->getHref()}#trackback"><span></span>Trackbacks ({$entry->getTrackbackCount()})</a></span>
+			<span class="trackbackslink"><a href="{$entry->getHref()|escape}#trackback"><span></span>Trackbacks ({$entry->getTrackbackCount()})</a></span>
 		{/if}
 		</div>
 	</div>
@@ -30,10 +30,10 @@
 	{foreach from=$trackbacks item=trackback}
 		<div class="trackback">
 			<a name="{$trackback->date}"></a>
-			<p>Trackback from <a href="{$trackback->url}">{$trackback->url}</a></p>
-			<p>{$trackback->title}:</p>
+			<p>Trackback from <a href="{$trackback->url|escape}">{$trackback->url|escape}</a></p>
+			<p>{$trackback->title|escape}:</p>
 			<p>
-				{$trackback->getExcerpt()|strip_tags}
+				{$trackback->getExcerpt()|strip_tags|escape}
 			</p>
 		</div>
 	{/foreach}
@@ -50,11 +50,11 @@
 			<div class="info">
 				Left by <span class="author">
 				{if $comment->homepage != ""}
-					<a href="{$comment->homepage}">{$comment->name}</a>
+					<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 				{elseif $comment->email != ""}
-					<a href=mailto:"{$comment->email}">{$comment->name}</a>
+					<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 				{else}
-					{$comment->name}
+					{$comment->name|escape}
 				{/if}
 				</span> at {$comment->date|date_format:"%B %d, %Y %I:%M %p"}
 			</div>
@@ -64,16 +64,16 @@
 		</div>
 	{/foreach}
 		<h3>Your comment:</h3>
-		<form id="commentform" action="." method="post">
+		<form id="commentform" action="" method="post">
 			<div>
 				<input type="hidden" name="blogid" value="{$entry->entryId}" />
 			</div>
 			<div class="label">Author (<span class="red">*</span>):</div>
-			<div class="input"><input id="author" type="text" name="name" value="{$w_name}" class="fixed" /></div>
+			<div class="input"><input id="author" type="text" name="name" value="{$w_name|escape}" class="fixed" /></div>
 			<div class="label">E-mail:</div>
-			<div class="input"><input id="authorEmail" type="text" name="email" value="{$w_email}" class="fixed" /></div>
+			<div class="input"><input id="authorEmail" type="text" name="email" value="{$w_email|escape}" class="fixed" /></div>
 			<div class="label">URL:</div>
-			<div class="input"><input id="authorURL" type="text" name="url" value="{$w_url|default:"http://"}" class="fixed" /></div>
+			<div class="input"><input id="authorURL" type="text" name="url" value="{$w_url|default:"http://"|escape}" class="fixed" /></div>
 			<div class="label">Comment (<span class="red">*</span>):</div>
 			<div class="input"><textarea id="commentText" name="body" rows="7" cols="55" class="fixed"></textarea></div>
 			<div class="label">&nbsp;</div>
diff -urN soojung-0.4.5/templates/ocean/footer.tpl soojung/templates/ocean/footer.tpl
--- soojung-0.4.5/templates/ocean/footer.tpl	2005-02-20 11:13:26.000000000 +0900
+++ soojung/templates/ocean/footer.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -9,7 +9,7 @@
 				<li><a href="{$baseurl}/index.php" class="rounded"><span>main</span></a></li>
 				<li><a href="{$baseurl}/admin.php" class="rounded"><span>admin</span></a></li>
 				{foreach from=$static_entries item=static}
-				<li><a href="{$static->getHref()}">{$static->title}</a></li>
+				<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 				{/foreach}
 			</ul>
 		</div>
@@ -18,7 +18,7 @@
 			<ul>
 				{foreach from=$categories item=category}
 				<li>
-					<a href="{$category->getHref()}" class="rounded"><span>{$category->name}</span></a> 
+					<a href="{$category->getHref()|escape}" class="rounded"><span>{$category->name|escape}</span></a> 
 					({$category->getEntryCount()})
 				</li>
 				{foreachelse}
@@ -31,7 +31,7 @@
 			<ul>
 				{foreach from=$archvies item=archive}
 				<li>
-					<a href="{$archive->getHref()}" class="rounded"><span>{$archive->getDate()|date_format:"%B %Y"}</span></a>
+					<a href="{$archive->getHref()|escape}" class="rounded"><span>{$archive->getDate()|date_format:"%B %Y"}</span></a>
 				</li>
 				{foreachelse}
 				<li></li>
@@ -43,7 +43,7 @@
 			<ul>
 				{foreach from=$recent_entries item=entry}
 				<li>
-					<a href="{$entry->getHref()}" class="rounded"><span>{$entry->title}</span></a>
+					<a href="{$entry->getHref()|escape}" class="rounded"><span>{$entry->title|escape}</span></a>
 				</li>
 				{foreachelse}
 				<li></li>
@@ -69,7 +69,7 @@
 			<ul>
 				{foreach from=$bookmarks item=bookmark}
 				<li>
-					<a href="{$bookmark->url}" class="rounded"><span>{$bookmark->name}</span></a>
+					<a href="{$bookmark->url|escape}" class="rounded"><span>{$bookmark->name|escape}</span></a>
 				</li>
 				{foreachelse}
 				<li></li>
diff -urN soojung-0.4.5/templates/ocean/header.tpl soojung/templates/ocean/header.tpl
--- soojung-0.4.5/templates/ocean/header.tpl	2005-02-15 19:42:20.000000000 +0900
+++ soojung/templates/ocean/header.tpl	2005-02-24 23:16:00.000000000 +0900
@@ -9,8 +9,9 @@
 	<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/ocean-elastic.css" title="elastic" media="screen" />
 	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
 	<script type="text/javascript" src="{$baseurl}/templates/{$skin}/ocean.js"></script>
+	<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 </head>
-<body>
+<body onload="return correct_bbcode_image();">
 
 <div id="main">
 	<div id="header">
diff -urN soojung-0.4.5/templates/ocean/index.tpl soojung/templates/ocean/index.tpl
--- soojung-0.4.5/templates/ocean/index.tpl	2005-02-15 19:42:20.000000000 +0900
+++ soojung/templates/ocean/index.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -7,7 +7,7 @@
 
 	<div class="entry">
 		<h3>{$entry->date|date_format:"%B %d, %Y"}</h3>
-		<h4><a href="{$entry->getHref()}">{$entry->title}</a></h4>
+		<h4><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h4>
 		<div class="post">
 			{$entry->getBody()}
 		</div>
@@ -16,10 +16,10 @@
 		</div>
 		<div class="links">
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<span class="commentslink"><a href="{$entry->getHref()}#comment"><span></span>Comments ({$entry->getCommentCount()})</a></span>
+			<span class="commentslink"><a href="{$entry->getHref()|escape}#comment"><span></span>Comments ({$entry->getCommentCount()})</a></span>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<span class="trackbackslink"><a href="{$entry->getHref()}#trackback"><span></span>Trackbacks ({$entry->getTrackbackCount()})</a></span>
+			<span class="trackbackslink"><a href="{$entry->getHref()|escape}#trackback"><span></span>Trackbacks ({$entry->getTrackbackCount()})</a></span>
 		{/if}
 		</div>
 	</div>
@@ -28,24 +28,24 @@
 
 	<div>
 	{if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 	{/if}
 	{if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 	{/if}
 	</div>
 
 {elseif $view == "archive"}
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 	{/foreach}
 {elseif $view == "category"}
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 <div class="clear"></div>
@@ -53,7 +53,7 @@
 {elseif $view == "search"}
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 <div class="clear"></div>
diff -urN soojung-0.4.5/templates/ocean/ocean.css soojung/templates/ocean/ocean.css
--- soojung-0.4.5/templates/ocean/ocean.css	2005-02-15 19:42:20.000000000 +0900
+++ soojung/templates/ocean/ocean.css	2005-02-26 15:53:18.000000000 +0900
@@ -287,6 +287,8 @@
 	border-bottom: 1px solid #A30000;
 }
 #links {
+	white-space: nowrap;
+	overflow: hidden;
 	padding: .8em;
 	line-height: 154%;
 }
diff -urN soojung-0.4.5/templates/rubric/entry.tpl soojung/templates/rubric/entry.tpl
--- soojung-0.4.5/templates/rubric/entry.tpl	2005-02-18 21:50:21.000000000 +0900
+++ soojung/templates/rubric/entry.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -2,7 +2,7 @@
 
 <h2>{$entry->date|date_format:"%B %d, %Y"}</h2>
 <div class="post">
-	<h3 class="storytitle">{$entry->title}</h3>
+	<h3 class="storytitle">{$entry->title|escape}</h3>
 	<div class="meta">
 		Posted at {$entry->date|date_format:"%I:%M %p"}
 	</div>
@@ -13,10 +13,10 @@
 	</div>
 	<div class="feedback">
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<a class="plink" href="{$entry->getHref()}#comment">Comments ({$entry->getCommentCount()})</a>
+			<a class="plink" href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<a class="plink" href="{$entry->getHref()}#trackback">Trackbacks ({$entry->getTrackbackCount()})</a>
+			<a class="plink" href="{$entry->getHref()|escape}#trackback">Trackbacks ({$entry->getTrackbackCount()})</a>
 		{/if}
 	</div>
 
@@ -31,11 +31,11 @@
 	<li>
 		<a name="{$trackback->date}"></a>
 		<p>
-			Trackback from <a href="{$trackback->url}">{$trackback->url}</a>
+			Trackback from <a href="{$trackback->url|escape}">{$trackback->url|escape}</a>
 		</p>
-		<p>{$trackback->title}:</p>
+		<p>{$trackback->title|escape}:</p>
 		<p>
-			{$trackback->getExcerpt()|strip_tags}
+			{$trackback->getExcerpt()|strip_tags|escape}
 		</p>
 	</li>
 {/foreach}
@@ -57,11 +57,11 @@
 		<p>
 			<cite>Comment by
 			{if $comment->homepage != ""}
-				<a href="{$comment->homepage}">{$comment->name}</a>
+				<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 			{elseif $comment->email != ""}
-				<a href=mailto:"{$comment->email}">{$comment->name}</a>
+				<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 			{else}
-				{$comment->name}
+				{$comment->name|escape}
 			{/if}
 			&#8212; {$comment->date|date_format:"%m/%d/%Y @ %I:%M %p"}
 			</cite>
@@ -72,18 +72,18 @@
 
 <h2>Leave a Comment</h2>
 
-<form id="commentform" action="." method="post">
+<form id="commentform" action="" method="post">
 	<p>
 		<input type="hidden" name="blogid" value="{$entry->entryId}" />
-		<input id="author" class="text" type="text" name="name" value="{$w_name}" />
+		<input id="author" class="text" type="text" name="name" value="{$w_name|escape}" />
 		<label for="author">Name</label>
 	</p>
 	<p>
-		<input id="email" class="text" type="text" name="email" value="{$w_email}" />
+		<input id="email" class="text" type="text" name="email" value="{$w_email|escape}" />
 		<label for="email">Email</label>
 	</p>
 	<p>
-		<input id="url" class="text" type="text" name="url" value="{$w_url|default:"http://"}" />
+		<input id="url" class="text" type="text" name="url" value="{$w_url|default:"http://"|escape}" />
 		<label for="email">URL</label>
 	</p>
 	<p>
diff -urN soojung-0.4.5/templates/rubric/footer.tpl soojung/templates/rubric/footer.tpl
--- soojung-0.4.5/templates/rubric/footer.tpl	2005-02-20 11:13:26.000000000 +0900
+++ soojung/templates/rubric/footer.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -6,7 +6,7 @@
 		<li><a href="{$baseurl}/index.php">main</a></li>
 		<li><a href="{$baseurl}/admin.php">admin</a></li>
 		{foreach from=$static_entries item=static}
-		<li><a href="{$static->getHref()}">{$static->title}</a></li>
+		<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 		{/foreach}
 	</ul>
 </li>
@@ -15,7 +15,7 @@
 	<ul>
 		{foreach from=$categories item=category}
 		<li>
-			<a href="{$category->getHref()}">{$category->name}</a> 
+			<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
 			({$category->getEntryCount()})
 		</li>
 		{foreachelse}
@@ -37,7 +37,7 @@
 	<ul>
 	{foreach from=$archvies item=archive}
 	<li>
-		<a href="{$archive->getHref()}">{$archive->getDate()|date_format:"%B %Y"}</a>
+		<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -62,7 +62,7 @@
 	<ul>
 	{foreach from=$bookmarks item=bookmark}
 	<li>
-		<a href="{$bookmark->url}">{$bookmark->desc}</a>
+		<a href="{$bookmark->url|escape}">{$bookmark->desc|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
diff -urN soojung-0.4.5/templates/rubric/header.tpl soojung/templates/rubric/header.tpl
--- soojung-0.4.5/templates/rubric/header.tpl	2005-02-18 21:50:21.000000000 +0900
+++ soojung/templates/rubric/header.tpl	2005-02-24 23:16:00.000000000 +0900
@@ -6,8 +6,9 @@
 
 	<link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/style.css" />
 	<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
+	<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 </head>
-<body>
+<body onload="return correct_bbcode_image();">
 
 <div id="rap">
 <h1 id="header"><a href="{$baseurl}" title="{$description}">{$title}</a></h1>
diff -urN soojung-0.4.5/templates/rubric/index.tpl soojung/templates/rubric/index.tpl
--- soojung-0.4.5/templates/rubric/index.tpl	2005-02-18 21:50:21.000000000 +0900
+++ soojung/templates/rubric/index.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -5,7 +5,7 @@
 
 <h2>{$entry->date|date_format:"%B %d, %Y"}</h2>
 <div class="post">
-	<h3 class="storytitle"><a href="{$entry->getHref()}">{$entry->title}</a></h3>
+	<h3 class="storytitle"><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h3>
 	<div class="meta">
 		Posted at {$entry->date|date_format:"%I:%M %p"}
 	</div>
@@ -16,10 +16,10 @@
 	</div>
 	<div class="feedback">
 		{if $entry->isSetOption("NO_COMMENT") == false}
-			<a href="{$entry->getHref()}#comment">Comments ({$entry->getCommentCount()})</a>
+			<a href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>
 		{/if}
 		{if $entry->isSetOption("NO_TRACKBACK") == false}
-			<a href="{$entry->getHref()}#trackback">Trackbacks ({$entry->getTrackbackCount()})</a>
+			<a href="{$entry->getHref()|escape}#trackback">Trackbacks ({$entry->getTrackbackCount()})</a>
 		{/if}
 	</div>
 </div>
@@ -28,10 +28,10 @@
 
 <div id="goto">
 	{if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 	{/if}
 	{if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 	{/if}
 </div>
 
@@ -39,7 +39,7 @@
 <div class="post">
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 	{/foreach}
@@ -48,16 +48,16 @@
 <div class="post">
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 	{/foreach}
 </div>
 {elseif $view == "search"}
-<div class="post>
+<div class="post">
 	{foreach from=$entries item=entry}
 	<p>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		on {$entry->date|date_format:"%B %d, %Y"}
 	</p>
 	{/foreach}
diff -urN soojung-0.4.5/templates/rubric/style.css soojung/templates/rubric/style.css
--- soojung-0.4.5/templates/rubric/style.css	2005-02-18 21:50:21.000000000 +0900
+++ soojung/templates/rubric/style.css	2005-02-26 15:53:18.000000000 +0900
@@ -43,6 +43,8 @@
    -------------------------------------------- */
 
 #menu {
+	white-space: nowrap;
+	overflow: hidden;
 	width: 14em;
 	position: absolute;
 	float: right;
@@ -120,6 +122,20 @@
 	margin-bottom: 0.33em;
 }
 
+blockquote
+{
+  padding: 5px;
+  border: 1px solid #ababab;
+  background-color: #FCF7F4;
+}
+
+pre
+{
+  padding: 5px;
+  border: 1px solid #EBD4C8;
+  background-color: #FCF7F4;
+}
+
 .storytitle {
 	margin-top: 0.25em;
 	color: #B54141;
diff -urN soojung-0.4.5/templates/seaside/entry.tpl soojung/templates/seaside/entry.tpl
--- soojung-0.4.5/templates/seaside/entry.tpl	2005-02-19 08:18:45.000000000 +0900
+++ soojung/templates/seaside/entry.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -2,7 +2,7 @@
 
 <div id="contents">
 	<div class="entry">
-		<h2>{$entry->title} <div class="category">{$entry->category->name}</div> <div class="date">{$entry->date|date_format:"%B %d, %Y %I:%M %p"}</div></h2>
+		<h2>{$entry->title|escape} <div class="category">{$entry->category->name|escape}</div> <div class="date">{$entry->date|date_format:"%B %d, %Y %I:%M %p"}</div></h2>
 		<p class="body">{$entry->getBody()}</p>
 	</div>
 
@@ -12,9 +12,9 @@
 {foreach from=$trackbacks item=trackback}
 	<div class="trackback">
 	<a name="{$trackback->date}"></a>
-	<a href="{$trackback->url}">{$trackback->url}</a><br />
-	{$trackback->title}<br />
-	{$trackback->getExcerpt()|strip_tags}
+	<a href="{$trackback->url|escape}">{$trackback->url|escape}</a><br />
+	{$trackback->title|escape}<br />
+	{$trackback->getExcerpt()|strip_tags|escape}
 	</div>
 {/foreach}
 </div>
@@ -26,11 +26,11 @@
 	<li id="{$comment->date}"> 
 		<p class="cmtinfo">
 		{if $comment->homepage != ""}
-			<a href="{$comment->homepage}">{$comment->name}</a>
+			<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 		{elseif $comment->email != ""}
-			<a href="mailto:{$comment->email}">{$comment->name}</a>
+			<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 		{else}
-			{$comment->name}
+			{$comment->name|escape}
 		{/if}|
 		{$comment->date|date_format:"%B %d, %Y %I:%M %p"}
 		</p>
@@ -45,15 +45,15 @@
 <table id="cmtform">
 <tr>
 	<th>Name:</th>
-	<td><input type="text" name="name" value="{$w_name}" class="text"></td>
+	<td><input type="text" name="name" value="{$w_name|escape}" class="text"></td>
 </tr>
 <tr>
 	<th>Email Address:</th>
-	<td><input type="text" name="email" value="{$w_email}" class="text"></td>
+	<td><input type="text" name="email" value="{$w_email|escape}" class="text"></td>
 </tr>
 <tr>
 	<th>URL:</th>
-	<td><input type="text" name="url" value="{$w_url|default:"http://"}" class="text"></td>
+	<td><input type="text" name="url" value="{$w_url|default:"http://"|escape}" class="text"></td>
 </tr>
 <tr>
 	<th>Comments:</th>
@@ -64,4 +64,4 @@
 {/if}
 </div>
 
-{include file="footer.tpl"}
\ No newline at end of file
+{include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/seaside/header.tpl soojung/templates/seaside/header.tpl
--- soojung-0.4.5/templates/seaside/header.tpl	2005-02-19 08:18:45.000000000 +0900
+++ soojung/templates/seaside/header.tpl	2005-02-24 23:16:00.000000000 +0900
@@ -5,8 +5,9 @@
 	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 	<link rel="Stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
 	<link rel="Alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
+	<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 </head>
-<body>
+<body onload="return correct_bbcode_image();">
 	<div id="header">
 		<h1>{$title}</h1>
-	</div>
\ No newline at end of file
+	</div>
diff -urN soojung-0.4.5/templates/seaside/index.tpl soojung/templates/seaside/index.tpl
--- soojung-0.4.5/templates/seaside/index.tpl	2005-02-19 08:18:45.000000000 +0900
+++ soojung/templates/seaside/index.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -2,31 +2,31 @@
 
 <div id="contents">
 {if $view == "category"}
-<h1 class="legend">Category: <strong>{$keyword}</strong></h1>
+<h1 class="legend">Category: <strong>{$keyword|escape}</strong></h1>
 {elseif $view == "archive"}
-<h1 class="legend">Archive: <strong>{$keyword}</strong></h1>
+<h1 class="legend">Archive: <strong>{$keyword|escape}</strong></h1>
 {elseif $view == "search"}
-<h1 class="legend">Search result of <strong>{$keyword}</strong></h1>
+<h1 class="legend">Search result of <strong>{$keyword|escape}</strong></h1>
 {/if}
 {foreach from=$entries item=entry}
 	<div class="entry">
-		<h2><a href="{$entry->getHref()}">{$entry->title}</a> <div class="category">{$entry->category->name}</div> <div class="date">{$entry->date|date_format:"%B %d, %Y"}</div></h2>
+		<h2><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a> <div class="category">{$entry->category->name|escape}</div> <div class="date">{$entry->date|date_format:"%B %d, %Y"}</div></h2>
 		<p class="body">{$entry->getBody()}</p>
-		<p class="info">{if $entry->isSetOption("NO_COMMENT") == false}<a class="plink" href="{$entry->getHref()}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
-		{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}</p>
+		<p class="info">{if $entry->isSetOption("NO_COMMENT") == false}<a class="plink" href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
+		{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()|escape}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}</p>
 	</div>
 {/foreach}
 	<div id="page">
 {if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 {/if}
 {if $prev_page_link && $next_page_link}
 		|
 {/if}
 {if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 {/if}
 	</div>
 </div>
 
-{include file="footer.tpl"}
\ No newline at end of file
+{include file="footer.tpl"}
diff -urN soojung-0.4.5/templates/seaside/sidebar.tpl soojung/templates/seaside/sidebar.tpl
--- soojung-0.4.5/templates/seaside/sidebar.tpl	2005-02-20 11:13:26.000000000 +0900
+++ soojung/templates/seaside/sidebar.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -3,7 +3,7 @@
 	<li><a href="{$baseurl}/index.php">main</a></li>
 	<li><a href="{$baseurl}/admin.php">admin</a></li>
 	{foreach from=$static_entries item=static}
-	<li><a href="{$static->getHref()}">{$static->title}</a></li>
+	<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 	{/foreach}
 	<li><a href="{$baseurl}/rss2.php" class="rss">RSS (2.0)</a></li>
 </ul>
@@ -22,7 +22,7 @@
 <ul>
 	{foreach from=$categories item=category}
 	<li>
-		<a href="{$category->getHref()}">{$category->name}</a> 
+		<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
 		({$category->getEntryCount()})
 	</li>
 	{foreachelse}
@@ -34,7 +34,7 @@
 <ul>
 	{foreach from=$archvies item=archive}
 	<li>
-		<a href="{$archive->getHref()}">{$archive->getDate()|date_format:"%B %Y"}</a>
+		<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -45,7 +45,7 @@
 <ul>
 	{foreach from=$bookmarks item=bookmark}
 	<li>
-		<a href="{$bookmark->url}">{$bookmark->name}</a>
+		<a href="{$bookmark->url|escape}">{$bookmark->name|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
diff -urN soojung-0.4.5/templates/simple/entry.tpl soojung/templates/simple/entry.tpl
--- soojung-0.4.5/templates/simple/entry.tpl	2005-01-18 22:54:12.000000000 +0900
+++ soojung/templates/simple/entry.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -1,7 +1,7 @@
 {include file="header.tpl"}
 
 <div class="entry">
-<h2>{$entry->title}</h2>
+<h2>{$entry->title|escape}</h2>
 {$entry->getBody()}
 <p class="posted">{$entry->date|date_format:"%B %d, %Y %I:%M %p"}</p>
 </div>
@@ -13,9 +13,9 @@
 {foreach from=$trackbacks item=trackback}
 	<div class="trackback">
 	<a name="{$trackback->date}"></a>
-	<a href="{$trackback->url}">{$trackback->url}</a><br />
-	{$trackback->title}<br />
-	{$trackback->getExcerpt()|strip_tags}
+	<a href="{$trackback->url|escape}">{$trackback->url|escape}</a><br />
+	{$trackback->title|escape}<br />
+	{$trackback->getExcerpt()|strip_tags|escape}
 	</div>
 {/foreach}
 </div>
@@ -30,11 +30,11 @@
 	<a name="{$comment->date}"></a>
 	On {$comment->date|date_format:"%B %d, %Y %I:%M %p"}, 
 	{if $comment->homepage != ""}
-		<a href="{$comment->homepage}">{$comment->name}</a>
+		<a href="{$comment->homepage|escape}">{$comment->name|escape}</a>
 	{elseif $comment->email != ""}
-		<a href=mailto:"{$comment->email}">{$comment->name}</a>
+		<a href="mailto:{$comment->email|escape}">{$comment->name|escape}</a>
 	{else}
-		{$comment->name}
+		{$comment->name|escape}
 	{/if}
 	said: <br />
 	{$comment->getBody()}
@@ -45,11 +45,11 @@
 <form action="" method="post">
 Post a comment<br />
 Name:<br />
-<input type="text" name="name" value="{$w_name}"><br />
+<input type="text" name="name" value="{$w_name|escape}"><br />
 Email Adress:<br />
-<input type="text" name="email" value="{$w_email}"><br />
+<input type="text" name="email" value="{$w_email|escape}"><br />
 URL:<br />
-<input type="text" name="url" value="{$w_url|default:"http://"}"><br />
+<input type="text" name="url" value="{$w_url|default:"http://"|escape}"><br />
 Comments:<br />
 <textarea name="body" rows="5" cols="40"></textarea><br />
 <input type="hidden" name="blogid" value="{$entry->entryId}">
diff -urN soojung-0.4.5/templates/simple/footer.tpl soojung/templates/simple/footer.tpl
--- soojung-0.4.5/templates/simple/footer.tpl	2005-02-20 11:13:26.000000000 +0900
+++ soojung/templates/simple/footer.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -6,7 +6,7 @@
 	<li><a href="{$baseurl}/index.php">main</a></li>
 	<li><a href="{$baseurl}/admin.php">admin</a></li>
 	{foreach from=$static_entries item=static}
-	<li><a href="{$static->getHref()}">{$static->title}</a></li>
+	<li><a href="{$static->getHref()|escape}">{$static->title|escape}</a></li>
 	{/foreach}
 </ul>
 
@@ -19,7 +19,7 @@
 <ul id="div_category">
 	{foreach from=$categories item=category}
 	<li>
-		<a href="{$category->getHref()}">{$category->name}</a> 
+		<a href="{$category->getHref()|escape}">{$category->name|escape}</a> 
 		({$category->getEntryCount()})
 	</li>
 	{foreachelse}
@@ -31,7 +31,7 @@
 <ul id="div_archive" class="div_hide">
 	{foreach from=$archvies item=archive}
 	<li>
-		<a href="{$archive->getHref()}">{$archive->getDate()|date_format:"%B %Y"}</a>
+		<a href="{$archive->getHref()|escape}">{$archive->getDate()|date_format:"%B %Y"}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -42,7 +42,7 @@
 <ul id="div_recent_entry" class="div_hide">
 	{foreach from=$recent_entries item=entry}
 	<li>
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
@@ -54,7 +54,7 @@
 <ul id="div_recent_comment" class="div_hide">
 	{foreach from=$recent_comments item=comment}
 	<li>
-		<a href="{$comment->getHref()}">{$comment->getBody()|strip_tags:false}</a>
+		<a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false|escape}</a>
 	</li>
 	{/foreach}
 </ul>
@@ -65,7 +65,7 @@
 <ul id="div_recent_trackback" class="div_hide">
 	{foreach from=$recent_trackbacks item=trackback}
 	<li>
-		<a href="{$trackback->getHref()}">{$trackback->url}</a>
+		<a href="{$trackback->getHref()|escape}">{$trackback->url|escape}</a>
 	</li>
 	{/foreach}
 </ul>
@@ -87,7 +87,7 @@
 <ul id="div_bookmark" class="div_hide">
 	{foreach from=$bookmarks item=bookmark}
 	<li>
-		<a href="{$bookmark->url}">{$bookmark->name}</a>
+		<a href="{$bookmark->url|escape}">{$bookmark->name|escape}</a>
 	</li>
 	{foreachelse}
 	<li></li>
diff -urN soojung-0.4.5/templates/simple/header.tpl soojung/templates/simple/header.tpl
--- soojung-0.4.5/templates/simple/header.tpl	2005-01-05 22:36:39.000000000 +0900
+++ soojung/templates/simple/header.tpl	2005-02-24 23:16:00.000000000 +0900
@@ -5,14 +5,7 @@
 <title>{$title}</title>
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
-<script type="text/javascript">/*<![CDATA[*/{literal}
-function fold_sidebar(objid) {
-document.getElementById(objid).className =
-(document.getElementById(objid).className ? '' : 'div_hide');
-return false;
-}
-{/literal}/*]]>*/</script>
-</head>
-<body>
+<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
+<body onload="return correct_bbcode_image();">
 <div id="header"><a href="{$baseurl}" title="{$description}">{$title}</a></div>
 <div id="content">
diff -urN soojung-0.4.5/templates/simple/index.tpl soojung/templates/simple/index.tpl
--- soojung-0.4.5/templates/simple/index.tpl	2004-11-12 08:28:24.000000000 +0900
+++ soojung/templates/simple/index.tpl	2005-03-01 02:01:21.000000000 +0900
@@ -3,37 +3,37 @@
 {if $view == "index"}
 	{foreach from=$entries item=entry}
 		<div class="entry">
-		<h2><a href="{$entry->getHref()}">{$entry->title}</a></h2>
+		<h2><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></h2>
 		{$entry->getBody()}
 		<p class="posted">
-			<a class="plink" href="{$entry->getHref()}">{$entry->date|date_format:"%B %d, %Y"}</a>
-			{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="{$entry->getHref()}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
-			{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
+			<a class="plink" href="{$entry->getHref()|escape}">{$entry->date|date_format:"%B %d, %Y"}</a>
+			{if $entry->isSetOption("NO_COMMENT") == false}| <a class="plink" href="{$entry->getHref()|escape}#comment">Comments ({$entry->getCommentCount()})</a>{/if}
+			{if $entry->isSetOption("NO_TRACKBACK") == false}| <a class="plink" href="{$entry->getHref()|escape}#trackback">TrackBacks ({$entry->getTrackbackCount()})</a>{/if}
 
 		</p>
 		</div>
 	{/foreach}
 	{if $prev_page_link != ""}
-		<a href="{$prev_page_link}">prev</a>
+		<a href="{$prev_page_link|escape}">prev</a>
 	{/if}
 	{if $next_page_link != ""}
-		<a href="{$next_page_link}">next</a>
+		<a href="{$next_page_link|escape}">next</a>
 	{/if}
 {elseif $view == "archive"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
 {elseif $view == "category"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
 {elseif $view == "search"}
 	{foreach from=$entries item=entry}
-		<a href="{$entry->getHref()}">{$entry->title}</a>
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a>
 		{$entry->date|date_format:"%B %d, %Y"}
 		<br />
 	{/foreach}
diff -urN soojung-0.4.5/templates/simple/styles.css soojung/templates/simple/styles.css
--- soojung-0.4.5/templates/simple/styles.css	2005-02-19 01:39:13.000000000 +0900
+++ soojung/templates/simple/styles.css	2005-02-24 10:36:51.000000000 +0900
@@ -49,12 +49,6 @@
   padding-bottom: 12px;
 }
 
-#content img
-{
-  border: solid 1px #999;
-  padding: 6px;
-}
-
 h2
 {
   font-family: "lucida grande", verdana, sans-serif;
@@ -229,4 +223,4 @@
 {
   font-weight: bold;
   border-bottom: dotted 1px #888;
-}
\ No newline at end of file
+}
diff -urN soojung-0.4.5/templates/simplebalance/entry.tpl soojung/templates/simplebalance/entry.tpl
--- soojung-0.4.5/templates/simplebalance/entry.tpl	2004-11-08 23:53:22.000000000 +0900
+++ soojung/templates/simplebalance/entry.tpl	2005-03-01 02:01:22.000000000 +0900
@@ -2,7 +2,7 @@
 
 <div class="entry thisentry">
 <h2>
-	<span class="box_title">{$entry->title}</span> <span class="hide">|</span>
+	<span class="box_title">{$entry->title|escape}</span> <span class="hide">|</span>
 	<span class="box_header">{$entry->category->name|escape} | {$entry->date|date_format:"%Y/%m/%d %p %I:%M"}</span>
 </h2>
 
diff -urN soojung-0.4.5/templates/simplebalance/footer.tpl soojung/templates/simplebalance/footer.tpl
--- soojung-0.4.5/templates/simplebalance/footer.tpl	2005-02-20 11:13:27.000000000 +0900
+++ soojung/templates/simplebalance/footer.tpl	2005-03-01 02:01:22.000000000 +0900
@@ -58,7 +58,7 @@
 <h3><a href="#none" onclick="return fold_sidebar('div_entry');">Recent Entries</a></h3>
 <ul id="div_entry"{if #showRecentEntries# == 0} class="hide"{/if}>
 {foreach from=$recent_entries item=entry}
-	<li><a href="{$entry->getHref()|escape}">{$entry->title}</a></li>
+	<li><a href="{$entry->getHref()|escape}">{$entry->title|escape}</a></li>
 {foreachelse}
 	<li></li>
 {/foreach}
@@ -69,7 +69,7 @@
 <h3><a href="#none" onclick="return fold_sidebar('div_comment');">Recent Comments</a></h3>
 <ul id="div_comment"{if #showRecentComments# == 0} class="hide"{/if}>
 {foreach from=$recent_comments item=comment}
-	<li><a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false}</a></li>
+	<li><a href="{$comment->getHref()|escape}">{$comment->getBody()|strip_tags:false|escape}</a></li>
 {/foreach}
 </ul>
 {/if}
@@ -87,7 +87,7 @@
 <h3><a href="#none" onclick="return fold_sidebar('div_referer');">Recent Referers</a></h3>
 <ul id="div_referer"{if #showRecentReferers# == 0} class="hide"{/if}>
 {foreach from=$recent_referers item=referer}
-	<li><a href="{$referer|escape}">{$referer|escape}</a></li>
+	<li><a href="{$referer}">{$referer}</a></li>
 {/foreach}
 </ul>
 {/if}
diff -urN soojung-0.4.5/templates/simplebalance/header.tpl soojung/templates/simplebalance/header.tpl
--- soojung-0.4.5/templates/simplebalance/header.tpl	2005-02-18 17:33:32.000000000 +0900
+++ soojung/templates/simplebalance/header.tpl	2005-03-01 02:01:22.000000000 +0900
@@ -13,6 +13,7 @@
 <title>{$title|escape}{if $subtitle != ""} | {$subtitle|escape}{/if}</title>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <meta name="generator" content="soojung {$soojung_version}" />
+<script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/css/{#cssFile#}" />
 {if #useCustomCSS# == 1}
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/css/custom.css" />
@@ -24,23 +25,16 @@
 <!--[if IE]>
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/css/msie.css" />
 <![endif]-->
-<script type="text/javascript">/*<![CDATA[*/{literal}
-function fold_sidebar(objid) {
-    document.getElementById(objid).className =
-        (document.getElementById(objid).className ? '' : 'hide');
-    return false;
-}
-{/literal}/*]]>*/</script>
 </head>
 
-<body>
+<body onload="return correct_bbcode_image();">
 
 <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
 <!--+ header ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
 <!--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
 
 <div id="header">
-	<h1><a href="{$baseurl|escape}">{$title|escape}</a></h1>
+	<h1><a href="{$baseurl|escape}">{$title}</a></h1>
 	<p class="float">today: {$today_count} | total: {$total_count} | <a href="{$baseurl}/admin.php">admin</a></p>
 </div>
 
diff -urN soojung-0.4.5/templates/simplebalance/index.tpl soojung/templates/simplebalance/index.tpl
--- soojung-0.4.5/templates/simplebalance/index.tpl	2004-11-08 23:53:22.000000000 +0900
+++ soojung/templates/simplebalance/index.tpl	2005-03-01 02:01:22.000000000 +0900
@@ -30,8 +30,8 @@
 
 {if $prev_page_link != "" or $next_page_link != ""}
 <p class="navibar"><span>
-	{if $prev_page_link != ""}<a href="{$prev_page_link}">&lt; prev</a>{else}&lt; prev{/if} |
-	{if $next_page_link != ""}<a href="{$next_page_link}">next &gt;</a>{else}next &gt;{/if}
+	{if $prev_page_link != ""}<a href="{$prev_page_link|escape}">&lt; prev</a>{else}&lt; prev{/if} |
+	{if $next_page_link != ""}<a href="{$next_page_link|escape}">next &gt;</a>{else}next &gt;{/if}
 </span></p>
 {/if}
 
@@ -41,7 +41,7 @@
 	<h2>Archive</h2>
 	<div class="box_body">
 {foreach from=$entries item=entry}
-		<a href="{$entry->getHref()|escape}">{$entry->title}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
 {/foreach}
 	</div>
 </div>
@@ -52,7 +52,7 @@
 	<h2>Category</h2>
 	<div class="box_body">
 {foreach from=$entries item=entry}
-		<a href="{$entry->getHref()|escape}">{$entry->title}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
 {/foreach}
 	</div>
 </div>
@@ -63,7 +63,7 @@
 	<h2>Search Results</h2>
 	<div class="box_body">
 {foreach from=$entries item=entry}
-		<a href="{$entry->getHref()|escape}">{$entry->title}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
+		<a href="{$entry->getHref()|escape}">{$entry->title|escape}</a> {$entry->date|date_format:"%B %d, %Y"}<br />
 {/foreach}
 	</div>
 </div>
diff -urN soojung-0.4.5/xmlrpc.php soojung/xmlrpc.php
--- soojung-0.4.5/xmlrpc.php	2005-02-19 11:08:17.000000000 +0900
+++ soojung/xmlrpc.php	2005-02-21 20:48:17.000000000 +0900
@@ -343,7 +343,7 @@
 				       "description" => new xmlrpcval($content, "string")
 				       ), "struct");
 
-    $structarray[] = $entrystruct; !d!,
+    $structarray[] = $entrystruct;
   }
   return new xmlrpcresp(new xmlrpcval($structarray, "array"));
 
