Skip to content

Commit

Permalink
Replaced spaces in the selected state tax dropdown value with a dash
Browse files Browse the repository at this point in the history
  • Loading branch information
felder101 committed Oct 14, 2024
1 parent bbe7e2d commit 2d4a306
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/StateTaxSelection.astro
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ states.sort((a, b) => a.data.name.localeCompare(b.data.name));
const state = dropdown.value;

if (state) {
const target=`${base_url}smarttax/tax-information-by-state/${state.toLowerCase()}/`;
// Create State Tax URL, replaced spaces in the selected value with dash to match URL pattern and prevent URL encoding
const target=`${base_url}smarttax/tax-information-by-state/${state.replace(/\s+/g, '-').toLowerCase()}/`;
window.location.href = target;
}
}
Expand Down

0 comments on commit 2d4a306

Please sign in to comment.