mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 21:19:32 +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:
@ -16,7 +16,7 @@ async function prepare(raw) {
|
||||
const model = Post.create({ id: 42, can_edit: true });
|
||||
const decoratorHelper = { widget, getModel: () => model };
|
||||
|
||||
const $elem = $(`<div>${cooked.string}</div>`);
|
||||
const $elem = $(`<div>${cooked.toString()}</div>`);
|
||||
checklistSyntax($elem[0], decoratorHelper);
|
||||
|
||||
currentRaw = raw;
|
||||
|
Reference in New Issue
Block a user