Project

General

Profile

Actions

Bug #13550

open

Regression: changed/broken link behavior

Added by Steven Köhler 2 days ago. Updated 1 day ago.

Status:
Review
Priority:
Normal
Assignee:
-
Target version:
Start date:
02/20/2025
Due date:
% Done:

0%

Estimated time:

Description

I discovered another issue introduced by WT-13501, again by Commit 05e4064. Before, having an <a href="#new_path">link</a> element on a page https://domain.tld/deploy-path/path with enabled internal path encoding would become <a href="https://domain.tld/deploy-path/new_path">link</a>. With the changes introduced by commit 05e4064 it now becomes <a href="https://domain.tld/deploy-path/path#">link</a>. This does not happen during the initial rendering, but on subsequent renderings. Several examples for this behavior can easily be found in the Widget Gallery. While this does not impact the links newly added onclick handler, which properly changes the internal path, this does impact other browser functionality like opening the link in a new tab, creating a bookmark from it or simply copying it, since the links actual target is no longer present in the rendered HTML. As far as I can tell it only affects ajax sessions.

The changed behavior is caused by the url = "#"; command in line 95 in RefEncoder.c. Initial tests show that removing that line seems to solve the issue - unless that change is required for some other functionality, that I am not aware of, of course. It would be nice if you could look into that. :)

Best regards
Steven

Actions #1

Updated by Matthias Van Ceulebroeck 2 days ago

  • Target version set to 4.11.4

Hello Steven,

this seems to have indeed been a too naive replacement. While the handler is indeed always rendered out correctly, and thus functionally would be correct. We cannot assume this is always the desired use-case.
I have scheduled this for the next release.

Actions #2

Updated by Romain Mardulyn 1 day ago

  • Status changed from New to InProgress
  • Assignee set to Romain Mardulyn
Actions #3

Updated by Romain Mardulyn 1 day ago

  • Status changed from InProgress to Review
  • Assignee deleted (Romain Mardulyn)
Actions

Also available in: Atom PDF