Merge pull request #3535 from manja/3.1

This commit is contained in:
Daniel Hensby 2016-11-03 14:39:24 +00:00
commit 683bde6d82
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -213,11 +213,12 @@ ss.editorWrappers.tinyMCE = (function() {
* {DOMElement}
*/
cleanLink: function(href, node) {
var cb = tinyMCE.settings['urlconverter_callback'];
var cb = tinyMCE.settings['urlconverter_callback'],
cu = tinyMCE.settings['convert_urls'];
if(cb) href = eval(cb + "(href, node, true);");
// Turn into relative
if(href.match(new RegExp('^' + tinyMCE.settings['document_base_url'] + '(.*)$'))) {
// Turn into relative, if set in TinyMCE config
if(cu && href.match(new RegExp('^' + tinyMCE.settings['document_base_url'] + '(.*)$'))) {
href = RegExp.$1;
}