[FIX] website: widget share doesn't always work
Depending on the area (in this case a html field), the editor can escape the url which wasn't taken into account by this widget. closes #6726 opw-639852
This commit is contained in:
parent
cab5e3668f
commit
02fb59fffa
|
@ -137,7 +137,8 @@
|
|||
var title = encodeURIComponent($("title").text());
|
||||
this.$target.find("a").each(function () {
|
||||
var $a = $(this);
|
||||
$a.attr("href", $(this).attr("href").replace("{url}", url).replace("{title}", title));
|
||||
var url_regex = /\{url\}|%7Burl%7D/, title_regex = /\{title\}|%7Btitle%7D/;
|
||||
$a.attr("href", $(this).attr("href").replace(url_regex, url).replace(title_regex, title));
|
||||
if ($a.attr("target") && $a.attr("target").match(/_blank/i)) {
|
||||
$a.click(function () {
|
||||
window.open(this.href,'','menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=550,width=600');
|
||||
|
|
Loading…
Reference in New Issue