mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
fix: 當標題有符號'時,disqus 和 disqusjs 無法加載的 bug
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
- let disqusjsApi = theme.disqusjs.api || 'https://disqus.skk.moe/disqus/'
|
||||
- let disqusjsPageTitle = page.title.replace(/'/ig,"\\'")
|
||||
|
||||
script.
|
||||
function loadDisqusjs () {
|
||||
function addDisqusjsCSS () {
|
||||
@@ -15,7 +17,7 @@ script.
|
||||
siteName: '!{theme.disqusjs.siteName}',
|
||||
identifier: '!{ page.path }',
|
||||
url: '!{ page.permalink }',
|
||||
title: '!{ page.title }',
|
||||
title: '!{ disqusjsPageTitle }',
|
||||
api: '!{disqusjsApi}',
|
||||
apikey: '!{theme.disqusjs.apikey}',
|
||||
nocomment: '!{theme.disqusjs.nocomment}',
|
||||
|
||||
Reference in New Issue
Block a user