Closed iladan0 closed 1 year ago
Thanks for the report! This is indeed an issue in branca's colormap functionality.
Looking into it very shortly, the issue seems to be in https://github.com/python-visualization/branca/blob/master/branca/templates/color_scale.js. My first intuition is to use Jinja2's tojson
filter, which we use throughout folium already for the same purpose.
Describe the bug When the caption of the colormap contains an apostrophe, the folium map does not show (I get a white rectangle)
To Reproduce
Expected behavior The expected behavior is to get a folium map with red to green colormap having the caption "Agency's rating" but i got a white rectangle
Environment (please complete the following information):
Additional context The code works perfectly fine if the caption does not have an apostrophe.
Possible solutions List any solutions you may have come up with.
folium is maintained by volunteers. Can you help making a fix for this issue?