escape path segments with escapeStringHTML()

This commit is contained in:
joshuaboud 2022-05-25 16:40:58 -03:00
parent 8bd30b1d1f
commit d3d16bf903
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E

View File

@ -7,7 +7,9 @@
<button
@click.prevent.stop="$emit('cd', `/${pathArr.slice(1, index + 1).join('/')}`)"
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>
</div>
</div>
@ -17,6 +19,7 @@
import { ref, watch, nextTick } from 'vue';
import { canonicalPath } from "@45drives/cockpit-helpers";
import { ChevronRightIcon } from '@heroicons/vue/solid';
import { escapeString, escapeStringHTML } from '../functions/escapeStringHTML';
export default {
props: {
@ -53,6 +56,8 @@ export default {
inputRef,
changeCallback,
canonicalPath,
escapeString,
escapeStringHTML,
}
},
components: {