<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1 +1,2 @@
 .DS_Store
+demo.html
\ No newline at end of file</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,10 @@ describe('GSA results', {
     expect(r.first().get('snippet')).should_be('Today I spoke with &lt;b&gt;Jesse Newland&lt;/b&gt;, LexBlog&amp;#39;s IT Director, about the sp. &lt;b&gt;...&lt;/b&gt; &lt;b&gt;Jesse&lt;/b&gt;&lt;br&gt; &lt;b&gt;Newland&lt;/b&gt;: Speed, reliability, [and] scalability. Speed. &lt;b&gt;...&lt;/b&gt;');
     expect(r.first().get('title')).should_be(&quot;LexBlog IT Director talks about today&amp;#39;s platform upgrade : Real &lt;b&gt;...&lt;/b&gt;&quot;);
     expect(r.first().get('url')).should_be(&quot;http://kevin.lexblog.com/2007/07/articles/cool-stuff/lexblog-it-director-talks-about-todays-platform-upgrade/&quot;);
+  },
+  
+  'should have a custom toTemplateReplacements': function() {
+    expect(new String('#{title} #{details.date}').interpolate(r.first())).should_be('LexBlog IT Director talks about today&amp;#39;s platform upgrade : Real &lt;b&gt;...&lt;/b&gt; 2007-07-13');
   }
   
 })</diff>
      <filename>spec/results.html</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,8 @@ Gsa.Results = Class.create({
     S: 'snippet',
     T: 'title',
     UD: 'url',
-    MT: 'meta'
+    MT: 'meta',
+    UE: 'encoded_url'
   }),
   
   initialize: function(json) {
@@ -37,6 +38,26 @@ Gsa.Results = Class.create({
         r.set(value, $H(r.unset(key)));
       }
     }.bind(r));
+    
+    //cache_url
+    r.unset('U');
+    if (!Object.isUndefined(r.get('HAS')) &amp;&amp; !Object.isUndefined(r.get('HAS').C) &amp;&amp; !Object.isUndefined(r.get('HAS').C.SZ)) {
+      r.set('cache_url', 'search?q=cache:'+r.get('HAS').C.CID+':'+r.get('encoded_url'))
+    }
+    r.unset('HAS');
+    
+    //toTemplateReplacements
+    r.toTemplateReplacements = function () {
+      hash = r.clone();
+      hash.each(function (pair) {
+        var key = pair.key, value = pair.value;
+        if (!Object.isString(value) &amp;&amp; !Object.isNumber(value)) {
+          hash.set(key,value._object);
+        }
+      });
+      return hash._object;
+    }.bind(r);
+    
     return r;
   },
   </diff>
      <filename>src/results.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ce7143a020e824e409ba0f25a2fcc9bf7578f064</id>
    </parent>
  </parents>
  <author>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </author>
  <url>http://github.com/jnewland/gsa-prototype/commit/84ae073a1e4e8988012d220ab7f2c006ca256914</url>
  <id>84ae073a1e4e8988012d220ab7f2c006ca256914</id>
  <committed-date>2008-01-28T15:20:00-08:00</committed-date>
  <authored-date>2008-01-28T15:20:00-08:00</authored-date>
  <message>toTemplateReplacements()</message>
  <tree>1e46b733a45e882e14fe6550a366593149a49a9a</tree>
  <committer>
    <name>Jesse Newland</name>
    <email>jnewland@gmail.com</email>
  </committer>
</commit>
