mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 00:24:52 +02:00
escape path segments with escapeStringHTML()
This commit is contained in:
parent
8bd30b1d1f
commit
d3d16bf903
@ -7,7 +7,9 @@
|
|||||||
<button
|
<button
|
||||||
@click.prevent.stop="$emit('cd', `/${pathArr.slice(1, index + 1).join('/')}`)"
|
@click.prevent.stop="$emit('cd', `/${pathArr.slice(1, index + 1).join('/')}`)"
|
||||||
class="p-2 hover:bg-accent rounded-lg cursor-pointer"
|
class="p-2 hover:bg-accent rounded-lg cursor-pointer"
|
||||||
>{{ segment }}</button>
|
v-html="escapeStringHTML(segment)"
|
||||||
|
:title="escapeString(`/${pathArr.slice(1, index + 1).join('/')}`)"
|
||||||
|
></button>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -17,6 +19,7 @@
|
|||||||
import { ref, watch, nextTick } from 'vue';
|
import { ref, watch, nextTick } from 'vue';
|
||||||
import { canonicalPath } from "@45drives/cockpit-helpers";
|
import { canonicalPath } from "@45drives/cockpit-helpers";
|
||||||
import { ChevronRightIcon } from '@heroicons/vue/solid';
|
import { ChevronRightIcon } from '@heroicons/vue/solid';
|
||||||
|
import { escapeString, escapeStringHTML } from '../functions/escapeStringHTML';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@ -53,6 +56,8 @@ export default {
|
|||||||
inputRef,
|
inputRef,
|
||||||
changeCallback,
|
changeCallback,
|
||||||
canonicalPath,
|
canonicalPath,
|
||||||
|
escapeString,
|
||||||
|
escapeStringHTML,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user