Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pelican_comment_system] Fix mailto link: use '\r\n' instead of '\n' #720

Merged
merged 1 commit into from
May 23, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pelican_comment_system/theme/static/js/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ var CommentSystem = {
return (norm < 10 ? '0' : '') + norm;
};
var body = ''
+ 'Hey,\nI posted a new comment on ' + document.URL + '\n\nGreetings ' + $("#pcs-comment-form-input-name").val() + '\n\n\n'
+ 'Hey,\nI posted a new comment on ' + document.URL + '\n\nGreetings ' + $("#pcs-comment-form-input-name").val() + '\n\n\n'
+ 'Raw comment data:\n'
+ '----------------------------------------\n'
+ 'email: \n' // just that I don't forget to write it down
Expand Down Expand Up @@ -69,7 +69,7 @@ var CommentSystem = {
var link = 'mailto:' + this.email_user + '@' + this.email_domain + '?subject='
+ encodeURIComponent(subject)
+ "&body="
+ encodeURIComponent(body);
+ encodeURIComponent(body.replace(/\r?\n/g, "\r\n"));
console.log(link)
return link;
}
Expand Down