title: {{bindAttr }} {{action}} [Object] Has no method replace
body: <p>when ember.js tries to render my template containing the following bindAttr. the following exception is thrown in handlebars.js</p>
  
  <pre><code>Uncaught TypeError: Object [object Object] has no method 'replace'   handlebars.js:848
  </code></pre>
  
  <p>bind attr tag:</p>
  
  <pre><code>&lt;div class="postWrapper" {{bindAttr style="display:none"}}&gt;
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>this also happens when i use the action helper</p>
  
  <pre><code>    &lt;div {{action Toggle}}  class="btn pull-right"&gt;
          &lt;i class="postToggler icon-chevron-down " &gt;&lt;/i&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p><em><strong>Update Full Code</em></strong></p>
  
  <p>Template</p>
  
  <pre><code>        &lt;script type="text/x-handlebars" data-template-name="Composer"&gt;
                  &lt;div class="postWrapper"&gt;
                                  &lt;div class="postContentWrapper" {{bindAttr style="controller.display"}}&gt;  
                      &lt;div class="row-fluid"&gt;
                      &lt;div class="pull-left span10"&gt;
                                          To :
                              &lt;input id="test2" type="text" style="margin-top: 7px;width:90%" /&gt;
                      &lt;/div&gt;
                      &lt;div {{action Toggle}}  class="btn pull-right"&gt;
                          &lt;i class="postToggler icon-chevron-down " &gt;&lt;/i&gt;
                      &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="row-fluid" style="height:100%" &gt;
                      &lt;div id="wmd-button-bar" style="width:48%;display:inline-block" &gt;&lt;/div&gt;
                      &lt;div class="pull-right"&gt;
                      &lt;a&gt;Hide preview&lt;/a&gt;
                      &lt;/div&gt;
                          &lt;div class="wmdWrapper" style="height:80%"&gt;
                              &lt;div class="wmd-panel" style="vertical-align: top;"&gt;
  
                                  &lt;textarea class="wmd-input" id="wmd-input" style="height: 100%;"&gt;&lt;/textarea&gt;
                              &lt;/div&gt;
                              &lt;div id="wmd-preview" class="wmd-preview pull-right"&gt;&lt;/div&gt;
                          &lt;/div&gt;
                          &lt;br /&gt;
  
                      &lt;/div&gt;
                      &lt;div class="row-fluid"&gt;
  
                      &lt;div class="span6  "&gt;
                          &lt;p&gt;
                              Tags :
                              &lt;input id="test" type="text" style="width:80%"/&gt;
                          &lt;/p&gt;
                      &lt;/div&gt;
                          &lt;div class="span2 pull-right"&gt;
                          &lt;button id="btnSubmitPost" class="btn btn-success pull-right"&gt;{{controller.buttonText}}&lt;/button&gt;
                          &lt;button id="btnCanelPost" class="btn btn-warning pull-right"&gt;Cancel&lt;/button&gt;
                      &lt;/div&gt;
  
                      &lt;/div&gt;
                      &lt;div class="row-fluid"&gt;
  
                      &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
          &lt;/script&gt;
  </code></pre>
  
  <p>View and render</p>
  
  <pre><code>        /*
          MODES
              NEW
              REPLY
  
          */
          Thoughts.ComposerController = Ember.Object.extend({
              mode: 2,
              visible: false,
              messageContent: "",
              buttonText: function () {
                  switch (this.get("mode")) {
                      case 1: return "Post";
                      case 2: return "Reply";
                  }
              }.property(),
  
              display: function () {
                  if (this.get("visible")) {
                      return 'display:block';
                  } else
                      return 'display:none';
              }.property(),
  
              Toggle: function(){
                  console.log('Helllo');
                  }
          });
  
          Thoughts.ComposerController = Thoughts.ComposerController.create();
  </code></pre>
  
  <p><strong>Error Information</strong></p>
  
  <p>object dump</p>
  
  <pre><code>            string: "data-ember-action="1""
              __proto__: Object
              constructor: function (string) {
              toString: function () {
              __proto__: Object
  </code></pre>
  
  <p>Crashes on the replace method, because the method replace is undefined</p>
  
  <pre><code>Handlebars.Utils = {
      escapeExpression: function (string) {
          // don't escape SafeStrings, since they're already safe
          if (string instanceof Handlebars.SafeString) {
              return string.toString();
          } else if (string == null || string === false) {
              return "";
          }
  
          if (!possible.test(string)) { return string; }
         ----&gt; return string.replace(badChars, escapeChar);
      },
  </code></pre>