From 51e9923c6c782def09d64e15d735a63e3281ddba Mon Sep 17 00:00:00 2001 From: JorisDebonnet Date: Tue, 26 Jan 2016 01:31:07 +0100 Subject: [PATCH] Fix incomplete functionality from #3734 #3734 introduced the ability to *create* `mailto:` links with a subject in them, without the ability to *edit* them. This fixes that. --- javascript/HtmlEditorField.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javascript/HtmlEditorField.js b/javascript/HtmlEditorField.js index 6ccaed14d..ca8128383 100644 --- a/javascript/HtmlEditorField.js +++ b/javascript/HtmlEditorField.js @@ -888,10 +888,11 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE; action = "update"; } - if(href.match(/^mailto:(.*)$/)) { + if(href.match(/^mailto:([^?]*)(\?subject=(.*))?$/)) { return { LinkType: 'email', email: RegExp.$1, + Subject: decodeURIComponent(RegExp.$3), Description: title }; } else if(href.match(/^(assets\/.*)$/) || href.match(/^\[file_link\s*(?:\s*|%20|,)?id=([0-9]+)\]?(#.*)?$/)) {