title: How to prevent strip plus sign with codeigniter url_title function?
body: <p>I am using that function in order to prevent wrong URL structure:</p>
  
  <pre><code>    &lt;?
  if (!defined('BASEPATH'))
      exit('No direct script access allowed');
  
  if (!function_exists('seo_helper')) {
  
  function seo_link($deger) {
  $turkce=array("ş","Ş","ı","(",")","'","ü","Ü","ö","Ö","ç","Ç"," ","/","*","?","ş","Ş","ı","ğ","Ğ","İ","ö","Ö","Ç","ç","ü","Ü");
  $duzgun=array("s","S","i","","","","u","U","o","O","c","C","-","-","-","","s","S","i","g","G","I","o","O","C","c","u","U");
  $deger=str_replace($turkce,$duzgun,$deger);
  $deger = url_title_plus($deger);
  return $deger;
  }  
  
  }  
  
  
  if ( ! function_exists('url_title_plus'))
  {
      function url_title_plus($str, $separator = 'dash', $lowercase = FALSE)
      {
          if ($separator == 'dash')
          {
              $search     = '_';
              $replace    = '-';
          }
          else
          {
              $search     = '-';
              $replace    = '_';
          }
  
          $trans = array(
                          '&amp;\#\d+?;'              =&gt; '',
                          '&amp;\S+?;'                =&gt; '',
                          '\s+'                   =&gt; $replace,
                          '[^a-z0-9\-\._]'        =&gt; '',
                          $replace            =&gt; $replace,
                          $replace.'$'            =&gt; $replace,
                          '^'.$replace            =&gt; $replace,
                          '\.+$'                  =&gt; ''
                      );
  
          $str = strip_tags($str);
  
          foreach ($trans as $key =&gt; $val)
          {
              $str = preg_replace("#".$key."#i", $val, $str);
          }
  
          if ($lowercase === TRUE)
          {
              $str = strtolower($str);
          }
  
          return trim(stripslashes($str));
      }
  }
  </code></pre>
  
  <p>Input string:</p>
  
  <pre><code>ATA'DAN MEZİTLİDE 4+1 HAVUZLU GÜVENLİKLİ KAÇMAZ!!!
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>ATADAN-MEZITLIDE-41-HAVUZLU-GUVENLIKLI-KACMAZ
  </code></pre>
  
  <p>What I want:</p>
  
  <pre><code>ATADAN-MEZITLIDE-4+1-HAVUZLU-GUVENLIKLI-KACMAZ
  </code></pre>