You are using an outdated browser and will encounter some problems with our website. Please consider upgrading.
Upgrade Now
Docs
Maps
Navigation
Search
Vision
Data
Help
Docs
Docs
MapsNavigationSearchVisionDataHelp
All docs
API v3.3.1
Map Object L.mapbox.map
Layers L.mapbox.tileLayer L.mapbox.featureLayer L.mapbox.styleLayer
Geocoding L.mapbox.geocoder
Controls L.mapbox.legendControl L.mapbox.geocoderControl L.mapbox.shareControl
Markers L.mapbox.marker.icon L.mapbox.marker.style
Simplestyle L.mapbox.simplestyle.style
Utility L.mapbox.sanitize
Configuration L.mapbox.accessToken L.mapbox.config.FORCE_HTTPS L.mapbox.config.HTTP_URL L.mapbox.config.HTTPS_URL
Guides API access tokens Upgrading from Mapbox.js v1 Mobile Theming Standalone
Leaflet L.Map L.Marker L.Popup L.TileLayer L.TileLayer.WMS L.TileLayer.Canvas L.ImageOverlay L.Path L.Polyline L.MultiPolyline L.Polygon L.MultiPolygon L.Rectangle L.Circle L.CircleMarker L.LayerGroup L.FeatureGroup L.GeoJson L.LatLng L.LatLngBounds L.Point L.Bounds L.Icon L.DivIcon L.Control L.Control.zoom L.Control.Attribution L.Control.Layers L.Control.Scale Events methods Event objects L.Class L.Browser L.Util L.Transformation L.LineUtil L.PolyUtil L.DomEvent L.DomUtil L.PosAnimation L.Draggable L.IHandler L.ILayer L.IControl L.IProjection L.ICRS Global Switches L.noConflict L.version
Mapbox.js
APIExamplesPlugins

L.mapbox.sanitize(string)

A HTML sanitization function, with the same effect as the default value of the sanitizer option of L.mapbox.featureLayer and L.mapbox.legendControl.

Options Value Description
text string String of content you wish to sanitize.
© MapboxTermsPrivacySecurity