REFACTOR: Remove constants from `text` helper

REFACTOR: Remove constants from text helper

diff --git a/app/assets/javascripts/discourse/app/lib/text.js b/app/assets/javascripts/discourse/app/lib/text.js
index 097e777..57ed68f 100644
--- a/app/assets/javascripts/discourse/app/lib/text.js
+++ b/app/assets/javascripts/discourse/app/lib/text.js
@@ -11,16 +11,15 @@ import { helperContext } from "discourse-common/lib/helpers";
 import Session from "discourse/models/session";
 
 function getOpts(opts) {
-  const siteSettings = Discourse.__container__.lookup("site-settings:main"),
-    site = Discourse.__container__.lookup("site:main");
+  let context = helperContext();
 
-  opts = _.merge(
+  opts = Object.assign(
     {
       getURL: getURLWithCDN,
-      currentUser: Discourse.__container__.lookup("current-user:main"),
-      censoredRegexp: site.censored_regexp,
-      customEmojiTranslation: site.custom_emoji_translation,
-      siteSettings,
+      currentUser: context.currentUser,
+      censoredRegexp: context.site.censored_regexp,
+      customEmojiTranslation: context.site.custom_emoji_translation,
+      siteSettings: context.siteSettings,
       formatUsername
     },
     opts

GitHub sha: df8ae689

This commit appears in #10480 which was merged by eviltrout.