The shortname of Disqus could contain dash character.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description

As shown in the figure screenshot from [Create a New Site Page](https://disqus.com/admin/create/) on the right-hand side.
The unique Disqus URL could be combined of :
- **Lowercase Letters**: `abcdefghijklmnopqrstuvwxyz`
- **Numbers**: `0123456789`
- **Dash**: `-`
CodiMD handles the Disqus section in the [disqus.ejs](https://github.com/hackmdio/codimd/blob/develop/public/views/shared/disqus.ejs). But it doesn't work for shortnames containing dash character, and it doesn't handle shortnames with uppercase letters currently.
It would be better to modify it as following code:
``` diff
- s.src = 'https://<%= disqus.replace(/[^A-Za-z0-9]+/g, '') %>.disqus.com/embed.js';
+ s.src = 'https://<%= disqus.toLowerCase().replace(/[^a-z0-9-]+/g, '') %>.disqus.com/embed.js';
```
Contributor guide
Assessment
This issue has not been assessed yet.