diff --git a/src/controllers/SettingsController.ts b/src/controllers/SettingsController.ts index fac1919..70f39f5 100644 --- a/src/controllers/SettingsController.ts +++ b/src/controllers/SettingsController.ts @@ -7,7 +7,7 @@ import { RequestHandler } from "../entities/RequestHandler"; import { UserHelper } from "../helpers/UserHelper"; import { GeneralSettings, UserPageStatus, SupportedLanguages, LangSettings } from "../entities/User"; -import { removeHTMLNodes, checkURL } from "../utils/StringUtils"; +import { removeHTMLNodes, checkURL, fixEncoding } from "../utils/StringUtils"; import { checkVirtualDirectoryAvailability, VirtualDirType } from "../utils/VirtualDirsUtils"; import { AccountHelper } from "../helpers/AccountHelper"; @@ -148,10 +148,10 @@ export class SettingsController { h.send({ id: userInfo.id, - security_question_1: userInfo.hasSecurityQuestion1 ? userInfo.security_question_1 : "", - security_answer_1: userInfo.hasSecurityAnswer1 ? userInfo.security_answer_1 : "", - security_question_2: userInfo.hasSecurityQuestion2 ? userInfo.security_question_2 : "", - security_answer_2: userInfo.hasSecurityAnswer2 ? userInfo.security_answer_2 : "", + security_question_1: userInfo.hasSecurityQuestion1 ? fixEncoding(userInfo.security_question_1) : "", + security_answer_1: userInfo.hasSecurityAnswer1 ? fixEncoding(userInfo.security_answer_1) : "", + security_question_2: userInfo.hasSecurityQuestion2 ? fixEncoding(userInfo.security_question_2) : "", + security_answer_2: userInfo.hasSecurityAnswer2 ? fixEncoding(userInfo.security_answer_2) : "", }); } } \ No newline at end of file