question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Where is `Ember.Handlebars.Utils.escapeExpression` in the @ember module system?

See original GitHub issue

Similar to the last comment in #9874, how does one access Ember.Handlebars.Utils.escapeExpression in a modern way, without importing all of ember? I need to escape HTML in my app (because I am decorating some user-input with markup) before marking it as htmlSafe() and can’t find any way of doing so without writing my own escaping function or importing some kind of addon.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:12
  • Comments:21 (15 by maintainers)

github_iconTop GitHub Comments

16reactions
Redsandrocommented, Feb 13, 2019

We need this.

Right now you need to either/or:

@rwjblue said:

Closing this for now. If we need to add these API’s to HTMLBars in the future, it will be simple.

What about now? Something possible that I should know about?

6reactions
jherdmancommented, May 9, 2019

Is there a resolution on this? It feels like a quintessential util for people who need to process text.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Accessing Ember.Handlebars.Utils.escapeExpression with ...
As of right now the Handlebars.Utils.escapeExpression function is not yet exported by the New Module Imports (aka. RFC 176).
Read more >
How does one access Ember.Handlebars.Utils ... - Medium
I get the following error:. “How does one access Ember.Handlebars.Utils.escapeExpression” is published by Brad Collins.
Read more >
Ember.Handlebars - 1.0 - Ember API Documentation
Prepares the Handlebars templating library for use inside Ember's view system. The Ember.Handlebars object is the standard Handlebars library, ...
Read more >
(PDF) Ember.js Guides The guide for building Ambitious Web ...
Handlebars.helper('highlight', function(value, options) { 2 var escaped = Handlebars.Utils.escapeExpression(value); 3 return new Ember.Handlebars.
Read more >
Accessing Ember.Handlebars.Utils.escapeExpression with ...
Handlebars.Utils.escapeExpression with new import syntax-ember.js. ... Utils.escapeExpression function is not yet exported by the New Module Imports (aka.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found