I have the following controller which contains a view:
Lead.Controllers.UrlSearch = Ember.Object.extend
init: ->
@_super()
@url_search = Lead.UrlSearch.create()
@url_search.set('search_url', 'http://www.bdec-online.com/bd-cmpy/bd-cz.cfm')
@view = Ember.View.create
controller: @
urlSearchBinding: 'controller.url_search'
templateName: 'app/templates/url_search/show'
@view.appendTo('#fieldset')
The template at app/templates/url_search/show is as follows
<label for="url_search_url">Url</label>
<input id="url_search_url" name="url_search[url]" size="30" type="search" value="{{urlSearch.search_url}}">
<button class="button" id="goButton" type="button">GO</button>
The view is rendered fine apart from the value parameter which has the metamorph script tags in like this:
<input id="url_search_url" name="url_search[url]" size="30" type="search" value="<script id='metamorph-0-start' type='text/x-placeholder'></script>http://www.bdec-online.com/bd-cmpy/bd-cz.cfm<script id='metamorph-0-end' type='text/x-placeholder'></script>">
Is there anyway I can stop these script tags getting rendered or is there a config setting somewhere to stop this?
This is precisely why the {{bindAttr}} helper is available. This should do the job for you: