mirror of
https://github.com/discourse/discourse-solved.git
synced 2026-09-18 23:31:35 -04:00
FIX: Escape names
This commit is contained in:
@@ -9,6 +9,7 @@ import PostCookedHtml from "discourse/components/post/cooked-html";
|
||||
import concatClass from "discourse/helpers/concat-class";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import escape from "discourse/lib/escape";
|
||||
import { iconHTML } from "discourse/lib/icon-library";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { i18n } from "discourse-i18n";
|
||||
@@ -45,7 +46,7 @@ export default class SolvedAcceptedAnswer extends Component {
|
||||
|
||||
const formattedUsername =
|
||||
this.siteSettings.display_name_on_posts && name
|
||||
? name
|
||||
? escape(name)
|
||||
: formatUsername(username);
|
||||
|
||||
return htmlSafe(
|
||||
@@ -67,7 +68,7 @@ export default class SolvedAcceptedAnswer extends Component {
|
||||
|
||||
const displayedUser =
|
||||
this.siteSettings.display_name_on_posts && name
|
||||
? name
|
||||
? escape(name)
|
||||
: formatUsername(username);
|
||||
|
||||
const data = {
|
||||
|
||||
@@ -6,6 +6,7 @@ import DButton from "discourse/components/d-button";
|
||||
import icon from "discourse/helpers/d-icon";
|
||||
import { ajax } from "discourse/lib/ajax";
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import escape from "discourse/lib/escape";
|
||||
import { formatUsername } from "discourse/lib/utilities";
|
||||
import { i18n } from "discourse-i18n";
|
||||
import DTooltip from "float-kit/components/d-tooltip";
|
||||
@@ -57,7 +58,7 @@ export default class SolvedUnacceptAnswerButton extends Component {
|
||||
const name = this.args.post.topic.accepted_answer.accepter_name;
|
||||
const displayedName =
|
||||
this.siteSettings.display_name_on_posts && name
|
||||
? name
|
||||
? escape(name)
|
||||
: formatUsername(username);
|
||||
if (this.args.post.topic.accepted_answer.accepter_username) {
|
||||
return i18n("solved.marked_solved_by", {
|
||||
|
||||
Reference in New Issue
Block a user