@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.esm.js CHANGED
@@ -3987,9 +3987,11 @@ function applyLinkData(link, data, customFields) {
3987
3987
  // Target
3988
3988
  if (data.target && data.target !== "_self") {
3989
3989
  link.setAttribute("target", data.target);
3990
+ link.setAttribute("rel", "noopener noreferrer");
3990
3991
  }
3991
3992
  else {
3992
3993
  link.removeAttribute("target");
3994
+ link.removeAttribute("rel");
3993
3995
  }
3994
3996
  // Custom field data-attributes
3995
3997
  for (const field of customFields) {
@@ -4059,9 +4061,10 @@ const LinkToolbarButton = (props) => {
4059
4061
  e.stopPropagation();
4060
4062
  const href = link.getAttribute("href");
4061
4063
  if (href && isUrlSafe(href))
4062
- window.open(href, "_blank");
4064
+ window.open(href, "_blank", "noopener,noreferrer");
4063
4065
  return;
4064
4066
  }
4067
+ e.preventDefault();
4065
4068
  if (isOpenRef.current)
4066
4069
  return;
4067
4070
  setTimeout(() => {