<div id="xmap">
</div>

<div id="formControl" class="leaflet-control-layers leaflet-control hide">
  <h1 class="text-center">Comments</h1>
  <p>
    <textarea id="comments" class="form-control" rows="10" readonly="readonly"><%= @map_note.comment %></textarea>
  </p>

  <p class="buttons">
    <button class="pull-left btn btn-default hideComments">Close Comments</button>
  </p>
</div>

<script>
  window.features = <%= raw @map_note.feature.to_json %>;
</script>

<div id="xmap">
</div>

<div id="formControl" class="leaflet-control-layers leaflet-control hide">
  <h1 class="text-center">Comments</h1>
  <p>
    <textarea id="comments" class="form-control" rows="10" readonly="readonly"><%= @map_note.comment %></textarea>
  </p>

  <p class="buttons">
    <button class="pull-left btn btn-default hideComments">Close Comments</button>
  </p>
</div>

<script>
  window.features = JSON.parse(<%= raw @map_note.feature.to_json.to_json %>);
</script>

Add extra parsing step for safety
Add extra parsing step for safety
