diff --git a/lib/v2/japanpost/radar.js b/lib/v2/japanpost/radar.js index d28ade2ab04ce0..a1cbeff737fd16 100644 --- a/lib/v2/japanpost/radar.js +++ b/lib/v2/japanpost/radar.js @@ -7,7 +7,7 @@ module.exports = { docs: 'https://docs.rsshub.app/routes/other#japanpost-ri-ben-you-bian', source: '/services/srv/search/direct', target: (params, url) => { - const reqCode = new URL(url).searchParams.get('reqCodeNo1').toUpperCase(); + const reqCode = new URL(url).searchParams.get('reqCodeNo1').replace(/[^0-9a-zA-Z]/g, '').toUpperCase(); const locale = new URL(url).searchParams.get('locale').toLowerCase(); if ((reqCode.search(/^(?:\d{11,12}|[A-Z]{2}\d{9}[A-Z]{2})$/) === 0 && locale === 'ja') || locale === 'en') { return `/japanpost/track/${reqCode}/${locale}`;