SafeString moved from Ember.Handlebars.SafeString to Ember.String.htmlSafe

I had problems figuring how to import SafeString. Googling led me to
Deprecate ‘Ember.Handlebars.SafeString’

Currently (as of 5/1/19 anyway), you import htmlSafe this way:

import { htmlSafe } from '@ember/template';

and call it this way:

return htmlSafe ( '<span class="text-primary">' + formatted + '</span>' );

With these changes, everything seems to work!

2 Likes

Thanks so much. I really want to finish this book, but man tracker has a lot of issues. Thanks again, this helped a lot. My sightings page just kept on posting non-stop, just the city.