Skip to content

Commit f9e3170

Browse files
committed
DOC-3151: Autolink behavior updated to preserve existing links.
1 parent 8e4236e commit f9e3170

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,21 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a
157157
// #TINY-vwxyz1
158158

159159
// CCFR here.
160+
=== Autolink behavior updated to preserve existing links
161+
// TINY-11836
162+
163+
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.
164+
165+
{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.
166+
167+
.Example of incorrect behavior
168+
[source,html]
169+
----
170+
<p><a href="https://www.google.com" target="_blank" rel="noopener">www.google.com</a></p> <!-- before -->
171+
<p><a href="https://www.google.com">www.google.com</a></p> <!-- after -->
172+
----
173+
174+
This update improves reliability when working with links, ensuring that attributes and destinations remain unchanged unless explicitly edited.
160175

161176

162177
[[security-fixes]]

0 commit comments

Comments
 (0)