fix: encode RSS uris with escape sequences before fetching (#14826)
Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
This commit is contained in:
		@@ -48,7 +48,7 @@ const fetching = ref(true);
 | 
			
		||||
const key = ref(0);
 | 
			
		||||
 | 
			
		||||
const tick = () => {
 | 
			
		||||
	window.fetch(`/api/fetch-rss?url=${props.url}`, {}).then(res => {
 | 
			
		||||
	window.fetch(`/api/fetch-rss?url=${encodeURIComponent(props.url)}`, {}).then(res => {
 | 
			
		||||
		res.json().then((feed: Misskey.entities.FetchRssResponse) => {
 | 
			
		||||
			if (props.shuffle) {
 | 
			
		||||
				shuffle(feed.items);
 | 
			
		||||
 
 | 
			
		||||
@@ -70,7 +70,7 @@ const items = computed(() => rawItems.value.slice(0, widgetProps.maxEntries));
 | 
			
		||||
const fetching = ref(true);
 | 
			
		||||
const fetchEndpoint = computed(() => {
 | 
			
		||||
	const url = new URL('/api/fetch-rss', base);
 | 
			
		||||
	url.searchParams.set('url', widgetProps.url);
 | 
			
		||||
	url.searchParams.set('url', encodeURIComponent(widgetProps.url));
 | 
			
		||||
	return url;
 | 
			
		||||
});
 | 
			
		||||
const intervalClear = ref<(() => void) | undefined>();
 | 
			
		||||
 
 | 
			
		||||
@@ -99,7 +99,7 @@ const items = computed(() => {
 | 
			
		||||
const fetching = ref(true);
 | 
			
		||||
const fetchEndpoint = computed(() => {
 | 
			
		||||
	const url = new URL('/api/fetch-rss', base);
 | 
			
		||||
	url.searchParams.set('url', widgetProps.url);
 | 
			
		||||
	url.searchParams.set('url', encodeURIComponent(widgetProps.url));
 | 
			
		||||
	return url;
 | 
			
		||||
});
 | 
			
		||||
const intervalClear = ref<(() => void) | undefined>();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user