diff --git a/includes/replacer.php b/includes/replacer.php index 0d5980e..d404b1a 100644 --- a/includes/replacer.php +++ b/includes/replacer.php @@ -232,6 +232,9 @@ function footnotes_getFromString($p_str_Content) $l_str_EndingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_END_USERDEFINED]; } + /* decode html special chars */ + $p_str_Content = htmlspecialchars_decode($p_str_Content); + /* check for a footnote placeholder in the current page */ do { /* get first occurence of a footnote starting tag */ diff --git a/includes/wysiwyg-editor.php b/includes/wysiwyg-editor.php index bcf1ae2..79457df 100644 --- a/includes/wysiwyg-editor.php +++ b/includes/wysiwyg-editor.php @@ -91,7 +91,7 @@ function footnotes_wysiwyg_ajax_callback() { require_once(dirname(__FILE__) . '/../includes/plugin-settings.php'); /* load footnote settings */ - $g_arr_FootnotesSettings = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, Class_FootnotesSettings::$a_arr_Default_Settings, false); + $g_arr_FootnotesSettings = footnotes_filter_options(FOOTNOTE_SETTINGS_CONTAINER, Class_FootnotesSettings::$a_arr_Default_Settings, true); /* get footnote starting tag */ $l_str_StartingTag = $g_arr_FootnotesSettings[FOOTNOTE_INPUTFIELD_PLACEHOLDER_START]; diff --git a/index.php b/index.php index 33fbec0..da7c120 100755 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/plugins/footnotes/ Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Author: media competence institute - Version: 1.2.1 + Version: 1.2.2 Author URI: http://cheret.co.uk/mci Text Domain: footnotes Domain Path: /languages diff --git a/js/wysiwyg-editor.js b/js/wysiwyg-editor.js index ac026e6..d1711ab 100644 --- a/js/wysiwyg-editor.js +++ b/js/wysiwyg-editor.js @@ -31,7 +31,7 @@ var l_arr_Tags = JSON.parse(data); var return_text = l_arr_Tags['start'] + ed.selection.getContent() + l_arr_Tags['end']; console.log(return_text); - ed.execCommand('mceInsertContent', 0, return_text); + ed.execCommand('insertHTML', true, return_text); }, error: function(MLHttpRequest, textStatus, errorThrown){ console.log("Error: " + errorThrown); diff --git a/readme.txt b/readme.txt index 936c512..5c7b9cb 100755 --- a/readme.txt +++ b/readme.txt @@ -61,6 +61,9 @@ No, this Plugin has been written from scratch. Of course some inspirations on ho == Changelog == += 1.2.2 = +- Bugfix: WYSIWYG editor and plain text editor buttons insert footnote short code correctly (also if defined like html tag) + = 1.2.1 = - Bugfix: HowTo example will be displayed correctly if a user defined short code is set