---
layout: api
title: "v2.1.7 JavaScript Library: L.mapbox.sanitize(string)"
categories: api
version: v2.1.7
permalink: /api/v2.1.7/l-mapbox-sanitize/
---
<h2 id="section-l-mapbox-sanitize">L.mapbox.sanitize(string)</h2>
<p>A HTML sanitization function, with the same effect as the default value of the <code>sanitizer</code> option of <code><a href="/mapbox.js/api/v2.1.7/l-mapbox-featurelayer">L.mapbox.featureLayer</a></code>, <code><a href="/mapbox.js/api/v2.1.7/l-mapbox-gridcontrol">L.mapbox.gridControl</