1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-22 05:19:22 +00:00

Fix questions encoding issue

This commit is contained in:
Pierre HUBERT 2020-03-21 19:02:54 +01:00
parent 3811a26024
commit e1dae7f2f6

View File

@ -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) : "",
});
}
}