Fix: Prevent UI corruption from Unicode control characters in usernames

This commit is contained in:
Lilia 2025-04-06 22:11:37 +09:00
parent f9a3db2ac3
commit 3b6d1cb4d8
No known key found for this signature in database
4 changed files with 10 additions and 4 deletions

View File

@ -21,7 +21,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
<template #user>
<EmA :class="$style.renoteUserName" :to="userPage(note.user)">
<EmUserName :user="note.user"/>
<span style="unicode-bidi: plaintext; display: inline-block;">
<EmUserName :user="note.user"/>
</span>
</EmA>
</template>
</I18n>

View File

@ -17,7 +17,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<I18n :src="i18n.ts.renotedBy" tag="span">
<template #user>
<EmA :class="$style.renoteName" :to="userPage(note.user)">
<EmUserName :user="note.user"/>
<span style="unicode-bidi: plaintext; display: inline-block;">
<EmUserName :user="note.user"/>
</span>
</EmA>
</template>
</I18n>

View File

@ -21,7 +21,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<I18n :src="i18n.ts.renotedBy" tag="span" :class="$style.renoteText">
<template #user>
<MkA v-user-preview="note.userId" :class="$style.renoteUserName" :to="userPage(note.user)">
<MkUserName :user="note.user"/>
<span style="unicode-bidi: plaintext; display: inline-block;">
<MkUserName :user="note.user"/>
</span>
</MkA>
</template>
</I18n>

View File

@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<span :class="$style.renoteText">
<I18n :src="i18n.ts.renotedBy" tag="span">
<template #user>
<MkA v-user-preview="note.userId" :class="$style.renoteName" :to="userPage(note.user)">
<MkA v-user-preview="note.userId" :class="$style.renoteName" :to="userPage(note.user)" style="unicode-bidi: plaintext; display: inline-block;">
<MkUserName :user="note.user"/>
</MkA>
</template>