diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-07-13 18:11:54 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-07-13 18:11:54 +0900 |
| commit | ad970dffdabb7b81ee18583c86898f48df0b4302 (patch) | |
| tree | b5b1e7a40c377369a4dd364b1f86a99462a469a4 /packages/client/src/components/global | |
| parent | :art: (diff) | |
| download | sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.tar.gz sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.tar.bz2 sharkey-ad970dffdabb7b81ee18583c86898f48df0b4302.zip | |
fix(client): fix url encoded string handling of nirax
Fix #8878
Diffstat (limited to 'packages/client/src/components/global')
| -rw-r--r-- | packages/client/src/components/global/url.vue | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/packages/client/src/components/global/url.vue b/packages/client/src/components/global/url.vue index 34ba9024cc..dc79a20649 100644 --- a/packages/client/src/components/global/url.vue +++ b/packages/client/src/components/global/url.vue @@ -1,5 +1,6 @@ <template> -<component :is="self ? 'MkA' : 'a'" ref="el" class="ieqqeuvs _link" :[attr]="self ? url.substr(local.length) : url" :rel="rel" :target="target" +<component + :is="self ? 'MkA' : 'a'" ref="el" class="ieqqeuvs _link" :[attr]="self ? url.substr(local.length) : url" :rel="rel" :target="target" @contextmenu.stop="() => {}" > <template v-if="!self"> @@ -23,14 +24,7 @@ import { toUnicode as decodePunycode } from 'punycode/'; import { url as local } from '@/config'; import * as os from '@/os'; import { useTooltip } from '@/scripts/use-tooltip'; - -function safeURIDecode(str: string) { - try { - return decodeURIComponent(str); - } catch { - return str; - } -} +import { safeURIDecode } from '@/scripts/safe-uri-decode'; export default defineComponent({ props: { @@ -42,7 +36,7 @@ export default defineComponent({ type: String, required: false, default: null, - } + }, }, setup(props) { const self = props.url.startsWith(local); |