title: smarty registerPlugin doesn't work correctly
body: <p>I have a very simple code, I have simplified my code to help you understand the exact problem</p>
  <pre><code>&lt;?php
  require_once('theme/libs/Smarty.class.php');
  $smarty = new Smarty();
  $smarty-&gt;setTemplateDir('theme/site/');
  $smarty-&gt;setCompileDir('theme/compile');
  $smarty-&gt;setConfigDir('theme/config');
  $smarty-&gt;setCacheDir('theme/cache');
  $smarty -&gt; plugins_dir = 'theme/libs/plugins/';
  $smarty-&gt;left_delimiter = '{';
  $smarty-&gt;right_delimiter = '}';
  
  function reg_combobox($params, $content, &amp;$smarty, &amp;$repeat){
  $str=&quot;&quot;;
  $str.=&quot;&lt;select&gt;&quot;;
  $str.=&quot;&lt;option  value=\&quot;0\&quot;  &gt;please select &lt;/option&gt;&quot;;
  for($i=0;$i&lt;2;$i++)
  $str.=&quot;&lt;option&gt;$i&lt;/option&gt;&quot;;
  $str.=&quot;&lt;/select&gt;&quot;;
  return $str;
  }
  $smarty-&gt;registerPlugin('block','mycombobox', 'reg_combobox');
  
  echo $smarty-&gt;fetch('index.tpl');
  ?&gt;
  </code></pre>
  <p>and index.tpl:</p>
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      {mycombobox}{/mycombobox}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>everything looks fine but my browser shoes 2 drop-down lists:</p>
  <pre><code>
  &lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;title&gt;title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;select&gt;&lt;option  value=&quot;0&quot;  &gt;please select &lt;/option&gt;&lt;option&gt;0&lt;/option&gt;&lt;option&gt;1&lt;/option&gt;
  &lt;/select&gt;
  &lt;select&gt;
  &lt;option  value=&quot;0&quot;  &gt;please select &lt;/option&gt;&lt;option&gt;0&lt;/option&gt;&lt;option&gt;1&lt;/option&gt;
  &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt; 
  </code></pre>
  <p>why?
  what is wrong with my codes?</p>