Skip to content

Commit cf6b570

Browse files
authored
Merge pull request johno#296 from muodov/escape-disqus-title
Escape post title when rendering disqus JS snippet
2 parents 5d0a2c4 + c6a4020 commit cf6b570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

_layouts/post.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1>{{ page.title }}</h1>
3939
<script type="text/javascript">
4040
var disqus_shortname = '{{ site.disqus_shortname }}';
4141
var disqus_identifier = '{{ page.id }}';
42-
var disqus_title = '{{ page.title }}';
42+
var disqus_title = {{ page.title | jsonify }};
4343

4444
(function() {
4545
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;

0 commit comments

Comments
 (0)