BoostIO / BoostNote-Legacy

This repository is outdated and new Boost Note app is available! We've launched a new Boost Note app which supports real-time collaborative writing. https://github.com/BoostIO/BoostNote-App
Other
17.07k stars 1.47k forks source link

Links to internal headers with some special characters not working in exported HTML #1768

Open Bubka opened 6 years ago

Bubka commented 6 years ago

Hello,

When exporting a note as HTML, links to internal headers with some special characters (like é,è,ê) do not work.

The Markdown header code:
## Objectif & Mode opératoire
The Markdown link code:
[Objectif & mode opératoire](#Objectif-Mode-opératoire)

(This link works in BoostNotes)


The HTML exported code of the header
<h2 data-line="13" id="Objectif-Mode-op%C3%A9ratoire">Objectif &amp; Mode opératoire</h2>
The HTML exported code of the link:
<a href="#Objectif-Mode-op%C3%A9ratoire">Objectif &amp; mode opératoire</a>

It seems to be a normal behavior of web browsers (at least for IE and FF). If I replace the encoded string by the corresponding character in the href attribute of the HTML file, it works:

<a href="#Objectif-Mode-opératoire">Objectif &amp; mode opératoire</a>
ValGibello commented 6 years ago

I can confirm the issue. However, I found that the links generated with a TOC won't work in Boostnote either if the titles include special characters.