kakawait / hugo-tranquilpeak-theme

A gorgeous responsive theme for Hugo blog framework
https://tranquilpeak.kakawait.com
GNU General Public License v3.0
926 stars 525 forks source link

fix long id in gitalk #508

Closed duval1024 closed 3 years ago

duval1024 commented 3 years ago

decode uri for gitalk

fixes #507

duval1024 commented 3 years ago

Please check this pull request. It is my first pull request. I am not sure if it is correct.

Thank you very much! @kakawait

kakawait commented 3 years ago

The problem with decodeURI is that it will work with your use case but not for all.

The main problem is that id must be unique and not more 50 chars.

What we can do in place of decodeURI is using hash function like md5 or sha1

Can you please check?

duval1024 commented 3 years ago

I agree with you. The best way to fix it is md5 or sha1. I will try later

duval1024 commented 3 years ago

@kakawait hi,I have changed it to md5 function. Please check. Thx~