fix: 當標題有符號'時,disqus 和 disqusjs 無法加載的 bug

This commit is contained in:
Jerry committed 2021-03-30 01:36:46 +08:00
1 parent 6057297f44
commit 531269c60e
3 files changed
+7 -3

No files matched your search

+3 -1
View File
@@ -1,9 +1,11 @@
- let disqusPageTitle = page.title.replace(/'/ig,"\\'")
script.
function loadDisqus () {
var disqus_config = function () {
this.page.url = '!{ page.permalink }'
this.page.identifier = '!{ page.path }'
this.page.title = '!{ page.title }'
this.page.title = '!{ disqusPageTitle }'
};
window.disqusReset = () => {