Skip to content

Commit

Permalink
Merge pull request #8 from atavakoli/master
Browse files Browse the repository at this point in the history
Release 1.1
  • Loading branch information
atavakoli committed Oct 14, 2014
2 parents 76aa885 + 06c05e6 commit 57947df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Changelog
=========

1.1
---

- Fixed errors when trying to send HTML emails (#4)
- Fixed the 'Send in plaintext only' checkbox not being saved (#6)
- Fixed sending emails with HTML characters inside post body (#3)

1.0
---

*Initial release*
6 changes: 4 additions & 2 deletions qa-publish-to-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function admin_form(&$qa_content)
qa_opt('plugin_publish2email_subject_prefix', qa_post_text('plugin_publish2email_subject_prefix_field'));
qa_opt('plugin_publish2email_fav_categories_only', (int)qa_post_text('plugin_publish2email_fav_cats_field'));
qa_opt('plugin_publish2email_use_bcc', (int)qa_post_text('plugin_publish2email_use_bcc_field'));
qa_opt('plugin_publish2email_plaintext_only', qa_post_text('plugin_publish2email_plaintext_only_field'));
qa_opt('plugin_publish2email_plaintext_only', (int)qa_post_text('plugin_publish2email_plaintext_only_field'));
qa_opt('plugin_publish2email_html_theme', qa_post_text('plugin_publish2email_html_theme_field'));
qa_opt('plugin_publish2email_show_trail', (int)qa_post_text('plugin_publish2email_show_trail_field'));
$saved = true;
Expand Down Expand Up @@ -336,6 +336,8 @@ function qa_db_category_favorite_emails($emails, $categoryid)

function qa_format_post($params, $ishtml)
{
require_once QA_INCLUDE_DIR.'qa-app-posts.php';

if (isset($params['text']))
$text = $params['text'];
else
Expand All @@ -346,7 +348,7 @@ function qa_format_post($params, $ishtml)
if ($params['format'] === 'html')
return $params['content'];
else
return '<pre>'.$text.'</pre>';
return '<pre>'.htmlspecialchars($text).'</pre>';
}
else
{
Expand Down

0 comments on commit 57947df

Please sign in to comment.