mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
DEV: Support for import Handlebars from 'handlebars'
; (#9600)
* Remove Handlebars.SafeString usage * DEV: Support for `import Handlebars from 'handlebars'`; * FIX: Sprockets was broken when `node_modules` was present By default the old version of sprockets looks for application.js anywhere, including in a node_modules folder if this exists (which it will when we move to Ember CLI.)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { registerUnbound } from "discourse-common/lib/helpers";
|
||||
import { renderIcon } from "discourse-common/lib/icon-library";
|
||||
import deprecated from "discourse-common/lib/deprecated";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export function iconHTML(id, params) {
|
||||
return renderIcon("string", id, params);
|
||||
@ -8,5 +9,5 @@ export function iconHTML(id, params) {
|
||||
|
||||
registerUnbound("fa-icon", function(icon, params) {
|
||||
deprecated("Use `{{d-icon}}` instead of `{{fa-icon}}");
|
||||
return new Handlebars.SafeString(iconHTML(icon, params));
|
||||
return htmlSafe(iconHTML(icon, params));
|
||||
});
|
||||
|
Reference in New Issue
Block a user