Allow all encoding for hashtags in URL (#3131)
This commit is contained in:
@@ -98,7 +98,7 @@ export function TagMenu({
|
|||||||
|
|
||||||
control.close(() => {
|
control.close(() => {
|
||||||
navigation.push('Hashtag', {
|
navigation.push('Hashtag', {
|
||||||
tag: tag.replaceAll('#', '%23'),
|
tag: encodeURIComponent(tag),
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -153,7 +153,7 @@ export function TagMenu({
|
|||||||
|
|
||||||
control.close(() => {
|
control.close(() => {
|
||||||
navigation.push('Hashtag', {
|
navigation.push('Hashtag', {
|
||||||
tag: tag.replaceAll('#', '%23'),
|
tag: encodeURIComponent(tag),
|
||||||
author: authorHandle,
|
author: authorHandle,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export function TagMenu({
|
|||||||
label: _(msg`See ${truncatedTag} posts`),
|
label: _(msg`See ${truncatedTag} posts`),
|
||||||
onPress() {
|
onPress() {
|
||||||
navigation.push('Hashtag', {
|
navigation.push('Hashtag', {
|
||||||
tag: tag.replaceAll('#', '%23'),
|
tag: encodeURIComponent(tag),
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
testID: 'tagMenuSearch',
|
testID: 'tagMenuSearch',
|
||||||
@@ -83,7 +83,7 @@ export function TagMenu({
|
|||||||
label: _(msg`See ${truncatedTag} posts by user`),
|
label: _(msg`See ${truncatedTag} posts by user`),
|
||||||
onPress() {
|
onPress() {
|
||||||
navigation.push('Hashtag', {
|
navigation.push('Hashtag', {
|
||||||
tag: tag.replaceAll('#', '%23'),
|
tag: encodeURIComponent(tag),
|
||||||
author: authorHandle,
|
author: authorHandle,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default function HashtagScreen({
|
|||||||
const [isPTR, setIsPTR] = React.useState(false)
|
const [isPTR, setIsPTR] = React.useState(false)
|
||||||
|
|
||||||
const fullTag = React.useMemo(() => {
|
const fullTag = React.useMemo(() => {
|
||||||
return `#${tag.replaceAll('%23', '#')}`
|
return `#${decodeURIComponent(tag)}`
|
||||||
}, [tag])
|
}, [tag])
|
||||||
|
|
||||||
const queryParam = React.useMemo(() => {
|
const queryParam = React.useMemo(() => {
|
||||||
@@ -83,7 +83,7 @@ export default function HashtagScreen({
|
|||||||
|
|
||||||
const onShare = React.useCallback(() => {
|
const onShare = React.useCallback(() => {
|
||||||
const url = new URL('https://bsky.app')
|
const url = new URL('https://bsky.app')
|
||||||
url.pathname = `/hashtag/${tag}`
|
url.pathname = `/hashtag/${decodeURIComponent(tag)}`
|
||||||
if (author) {
|
if (author) {
|
||||||
url.searchParams.set('author', author)
|
url.searchParams.set('author', author)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user