blog-template
blog-template copied to clipboard
fix: handle special characters in tag URLs
When the tag contains special characters like '#', the generated URL becomes invalid due to the presence of these characters. This commit fixes the issue by encoding the tag using encodeURIComponent before constructing the URL.
Changes:
- Use
encodeURIComponentto encode the tag to ensure special characters are properly handled. - Update the href attribute in the tag to use the encoded tag.
Now, tags with special characters (e.g., 'C#') will generate valid URLs.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| blog-template | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Aug 7, 2024 1:04pm |
Thank you.