iceshrimp/packages/client/src/components/global/MkUserName.vue
fruye 77ff4ca78f fix: Isolate unicode characters in display names (#9702)
This fixes a 'Follows you' badge on a profile page and account addresses in threads from being drawn backwards when an account has some special Unicode characters that change the direction of text in their name (i.e. U+202E RIGHT-TO-LEFT OVERRIDE).

Co-authored-by: fruye <fruye@unix.dog>
Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9702
Co-authored-by: fruye <fruye@noreply.codeberg.org>
Co-committed-by: fruye <fruye@noreply.codeberg.org>
2023-03-15 07:18:18 +00:00

22 lines
433 B
Vue

<template>
<Mfm :class="$style.root" :text="user.name || user.username" :plain="true" :nowrap="nowrap" :custom-emojis="user.emojis"/>
</template>
<script lang="ts" setup>
import { } from 'vue';
import * as misskey from 'calckey-js';
const props = withDefaults(defineProps<{
user: misskey.entities.User;
nowrap?: boolean;
}>(), {
nowrap: true,
});
</script>
<style lang="scss" module>
.root {
unicode-bidi: isolate;
}
</style>