-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link to markdown title with special characters #955 #8114
Comments
I'm unsure if this is a bug in how we handle anchors in markdown, or if it is expected behavior. Out of caution, marking this as a bug to be triaged by Eng, who can make the determination whether this should instead be an enhancement request. |
Hi, This is actually expected behavior: https://www.w3.org/TR/PR-html40-971107/struct/links.html#h-12.2.1 I recommend just using regular ascii characters. A workaround you could do is using |
Actually I can't use only ascii characters. Indeed, most languages except English (French in my case) use accents which are not ascii characters. I completely understand that you can't use those characters directly in the URL, but I'm just asking how I can generate a valid URL that points to a title with special characters. |
Hi @hoorelbeke-jimmy , Can you try using: |
Thanks it works, but why did you say it is not recommended ? |
Hi @hoorelbeke-jimmy , it's not recommended because https://www.w3.org/TR/PR-html40-971107/struct/links.html#h-12.2.1 |
Checklist
Summary
I am displaying with streamlit some content, and I would like to display some links to markdown titles present on the streamlit page. For instance, the following is working:
When I click on link, I return to the beginning of the section Introduction. However, this doesn't work when I use special characters in my title, for instance:
To better understand the issue, I clicked on the anchor link on the left of the title "# Présentation", and I see on the URL that the link is "78e1d857" (for "# Introduction" it was "introduction").
Why?
My goal would be to be able to generate a link to the section "# Présentation" within my streamlit page, and for this I need to understand why the anchor link is "78e1d857". I tried to reverse engineer how to get this link based on the title content by looking at GitHub Flavored markdown, but I didn't find a way to do so.
How?
A method in the streamlit package that returns the anchor link based on a makdown title would be even better, for instance:
Additional Context
No response
The text was updated successfully, but these errors were encountered: