Fix canned responses in HTML mode (#1489536)
| | |
| | | if ($("input[name='_is_html']").val() == '1') { |
| | | var editor = tinyMCE.get(this.env.composebody); |
| | | editor.getWin().focus(); // correct focus in IE & Chrome |
| | | editor.selection.setContent(insert, { format:'text' }); |
| | | editor.selection.setContent(this.quote_html(insert).replace(/\r?\n/g, '<br/>'), { format:'text' }); |
| | | } |
| | | // replace selection in compose textarea |
| | | else { |
| | |
| | | // save response |
| | | if ($RCMAIL->action == 'save-response' && isset($_POST['_name']) && !$RESPONSE_RECORD['static']) { |
| | | $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST, true)); |
| | | |
| | | if (!empty($name) && !empty($text)) { |
| | | $dupes = 0; |
| | |
| | | |
| | | if (!empty($_POST['_insert'])) { |
| | | $name = trim(rcube_utils::get_input_value('_name', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST)); |
| | | $text = trim(rcube_utils::get_input_value('_text', rcube_utils::INPUT_POST, true)); |
| | | |
| | | if (!empty($name) && !empty($text)) { |
| | | $dupes = 0; |