@overlap/rte 1.0.16 → 1.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3991,9 +3991,11 @@ function applyLinkData(link, data, customFields) {
3991
3991
  // Target
3992
3992
  if (data.target && data.target !== "_self") {
3993
3993
  link.setAttribute("target", data.target);
3994
+ link.setAttribute("rel", "noopener noreferrer");
3994
3995
  }
3995
3996
  else {
3996
3997
  link.removeAttribute("target");
3998
+ link.removeAttribute("rel");
3997
3999
  }
3998
4000
  // Custom field data-attributes
3999
4001
  for (const field of customFields) {
@@ -4063,9 +4065,10 @@ const LinkToolbarButton = (props) => {
4063
4065
  e.stopPropagation();
4064
4066
  const href = link.getAttribute("href");
4065
4067
  if (href && isUrlSafe(href))
4066
- window.open(href, "_blank");
4068
+ window.open(href, "_blank", "noopener,noreferrer");
4067
4069
  return;
4068
4070
  }
4071
+ e.preventDefault();
4069
4072
  if (isOpenRef.current)
4070
4073
  return;
4071
4074
  setTimeout(() => {