Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend/src/components/common/navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ import routerBackMixin from '@/common/router-back-mixin';
import { bus } from '@/common/bus';
import { INavConfig } from '@/types';
import logoSrc from '@/images/logoIcon.png';
import xss from 'xss';

interface IUserItem {
id: string
Expand All @@ -159,7 +160,7 @@ export default class NodemanNavigation extends Mixins(routerBackMixin) {
navigationType: 'top-bottom',
headerTitle: window.i18n.t('蓝鲸节点管理'),
};
private currentUser = window.PROJECT_CONFIG.USERNAME;
private currentUser = xss(window.PROJECT_CONFIG.USERNAME);
private navToggle = false;
private navHover = false;
private bizSelectFocus = false;
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/setup-table/table-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ import InstallInputType from './install-input-type.vue';
import { IFileInfo, ISetupRow } from '@/types';
import TableHeaderTip from './table-header-tip.vue';
import { getConfigRemark } from '@/config/config';
import xss from 'xss';

@Component({
name: 'table-header',
Expand Down Expand Up @@ -148,9 +149,11 @@ export default class TableHeader extends Vue {
bus.$on('batch-btn-click', this.hidePopover); // 只出现一个弹框
}
private mounted() {
const dropdownContent = this.tipRef.innerHTML;
const safeContent = xss(dropdownContent);
if (this.tips) {
this.popoverInstance = this.$bkPopover(this.tipSpan, {
content: this.tipRef,
content: safeContent,
allowHTML: true,
trigger: 'mouseenter',
arrow: true,
Expand Down
Loading