title: Smarty: cannot replace string
body: <p>I'm new to Smarty and I have a variable which contains a URL <a href="http://someurl.com" rel="nofollow">http://someurl.com</a> and I'm trying to perform a replace operation on it, to show <a href="http://m.someurl.com" rel="nofollow">http://m.someurl.com</a>. This is what I have, but it's not working.</p>
  
  <pre><code>{$theurl | replace: 'http://' :'http://m.'}
  </code></pre>
  
  <p>I also tried assigning the $theurl to a second variable and perform the replacement there, but I have no luck.</p>
  
  <p>I also tried escaping the slashes, replacing http for xxx, and nothing works. </p>
  
  <p>I took a look here for reference: <a href="http://www.smarty.net/docsv2/en/language.modifier.replace.tpl" rel="nofollow">http://www.smarty.net/docsv2/en/language.modifier.replace.tpl</a></p>