How do you use htmlSafe in a helper?
See original GitHub issueCopied from an Ember helper:
import { htmlSafe } from '@ember/string';
helper() {
return htmlSafe(' ');
}
How can you do that in a Glimmer helper?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
htmlSafe - 4.8 - Ember API Documentation
Use this method to indicate that a string should be rendered as HTML when the string is used in a template. To say...
Read more >Helper not recognizing the `htmlSafe` stuff - Stack Overflow
I am trying to retun a value with space added through helper . but I am not getting the result. here is my...
Read more >html_safe (String) - APIdock
html_safe () public ... This method is equivalent to the raw helper in views. It is recommended that you use sanitize instead of...
Read more >Found unsafe method htmlSafe() JS-S1007 - DeepSource
Define your own trusted sanitizing Handlebars helper. htmlSafe marks a string as safe for unescaped output with Ember templates so you can render...
Read more >ember-cli-string-helpers - npm
String helpers for Ember. Latest version: 6.1.0, last published: 2 years ago. Start using ember-cli-string-helpers in your project by ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Not sure the exact correct way, but for future travelers the glimmer-vm now supports returning an object with this shape:
https://github.com/glimmerjs/glimmer-vm/pull/133
And it will treat it as a safeString (could use some verification)
Closing due to inactivity!