Skip to content

Conversation

leah-9000
Copy link
Contributor

@leah-9000 leah-9000 commented Aug 27, 2025

Fixes XSS when rendering place_name.

https://mapbox.atlassian.net/browse/SGEO-2914

Note that bumping the version number for package and CHANGELOG are deferred to another PR, according to these deployment instructions.

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • run npm run docs and commit changes to API.md (no changes)
  • update CHANGELOG.md with changes under main heading before merging

@leah-9000 leah-9000 marked this pull request as ready for review August 27, 2025 21:41
@leah-9000 leah-9000 requested review from a team, ibesora and underoot August 27, 2025 21:50
@@ -93,6 +93,16 @@ function MapboxGeocoder(options) {
this.geolocation = new Geolocation();
}

function escapeHtml(str) {
if (!str) return '';
return String(str)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to include / as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Without the preceding <, the slash is a harmless character.

Copy link

@ir-map ir-map left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@underoot underoot merged commit e7111df into main Aug 28, 2025
4 checks passed
@underoot underoot mentioned this pull request Aug 28, 2025
@underoot
Copy link
Member

Fix was published https://github.com/mapbox/mapbox-gl-geocoder/releases/tag/v5.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants