Skip to content

Commit

Permalink
Merge branch 'fix/#5387/navigation-improvement' into 'develop'
Browse files Browse the repository at this point in the history
[Issue #5387] Clear document title from tags

See merge request canopsis/canopsis-pro!3906
  • Loading branch information
mmourcia committed Aug 2, 2024
2 parents 29b7beb + b811746 commit 60cb7f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<template>
<v-layout column>
<v-layout>
<v-text-field
<text-editor-field
v-field="form.app_title"
:disabled="disabled"
:label="$t('userInterface.appTitle')"
class="fill-width"
/>
</v-layout>
<c-duration-field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { isMatch } from 'lodash';
import { DEFAULT_APP_TITLE } from '@/config';
import { CANOPSIS_EDITION, ROUTES_NAMES, USER_PERMISSIONS_TO_PAGES_RULES } from '@/constants';

import { sanitizeHtml } from '@/helpers/html';
import { compile } from '@/helpers/handlebars';

const { mapGetters, mapActions } = createNamespacedHelpers('info');
Expand Down Expand Up @@ -74,7 +75,10 @@ export const entitiesInfoMixin = {

async setTitle() {
document.title = this.appTitle
? await compile(this.appTitle)
? await compile(sanitizeHtml(this.appTitle, {
allowedTags: [],
allowedAttributes: {},
}))
: DEFAULT_APP_TITLE;
},
},
Expand Down

0 comments on commit 60cb7f6

Please sign in to comment.