Skip to content

Commit 2f2d26b

Browse files
authored
DOC-3151: Autolink behavior updated to preserve existing links. (#3714)
1 parent e5aaf24 commit 2f2d26b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

modules/ROOT/pages/7.9.0-release-notes.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,22 @@ In previous versions of {productname}, an issue was identified where the editor
218218

219219
With the release of {productname} {release-version}, this issue has been addressed by implementing event handlers that intercept and block IME-related input events and their default behaviors while in read-only mode. This enhancement ensures that the readonly setting is strictly enforced, preventing content modifications from all input sources, including IME.
220220

221+
=== Autolink behavior was updated to preserve existing links.
222+
// TINY-11836
223+
224+
Previously, the Autolink plugin could incorrectly re-link content that was already part of a hyperlink when the user pressed Enter at the end of a line. This occurred when the cursor was placed immediately after a link element rather than inside it and the visible text resembled a URL. As a result, Autolink could unintentionally overwrite link attributes, modify the destination URL, or alter otherwise valid markup.
225+
226+
{productname} {release-version} resolves this issue by treating any text inside or directly following a hyperlink as the end of its search scope. This prevents Autolink from creating a new link if the content is already hyperlinked. The behavior now consistently mirrors the existing handling for cases when the cursor is inside a link.
227+
228+
.Example of incorrect behavior
229+
[source,html]
230+
----
231+
<p><a href="https://www.google.com" target="_blank" rel="noopener">www.google.com</a></p> <!-- before -->
232+
<p><a href="https://www.google.com">www.google.com</a></p> <!-- after -->
233+
----
234+
235+
This update improves reliability when working with links, ensuring that attributes and destinations remain unchanged unless explicitly edited.
236+
221237
=== Editor did not scroll into viewport on receiving focus on Chrome and Safari.
222238
// #TINY-12017
223239

0 commit comments

Comments
 (0)