<script>
$("#<%= anchor_for(object) %>").prepend(
  '<a class="permalink" href="/<%= base_path(router.docs_prefix) %>/<%= urlencode serializer.serialized_path(object) %>">permalink</a>');
</script>
<script>
$(document.getElementById("<%= anchor_for(object) %>")).prepend(
  '<a class="permalink" href="/<%= base_path(router.docs_prefix) %>/<%= urlencode serializer.serialized_path(object) %>">permalink</a>');
</script>

Fix jquery issue parsing invalid id values
Fix jquery issue parsing invalid id values
