mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Future-proof htmlSafe
interactions (#23596)
See https://github.com/discourse/discourse-encrypt/pull/282 > `cooked` was an Ember SafeString. The internal storage of the string changed from `.string` to `.__string` at some point between Ember 3.28 and Ember 5. Instead, we can use `toString()` which is guaranteed to work in all situations
This commit is contained in:
@ -6,6 +6,8 @@ export default Component.extend({
|
||||
this._super(...arguments);
|
||||
|
||||
const contents = $(this.element).html();
|
||||
cookAsync(contents).then((cooked) => $(this.element).html(cooked.string));
|
||||
cookAsync(contents).then((cooked) =>
|
||||
$(this.element).html(cooked.toString())
|
||||
);
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user