Problem/Motivation

The Entity Mesh table includes a column labeled “Target Href” whose values are paths like strings. Currently they are rendered as plain text, forcing users to copy and paste the URL.

For usability, these values should be clickable links on HTML page displays and navigate directly to the target. However, when exporting to CSV, the value must remain plain text (no HTML/markup), preserving a “flat” export for downstream processing.

Steps to reproduce

1. Visit the view (admin listing/page display) that shows the Target Href column.
2. Observe that values are shown as plain text, not clickable.
3. Export the same view as CSV (via the CSV/Data export display) and confirm the column is present as text.

CommentFileSizeAuthor
#5 target_href.png111.69 KBeduardo morales alberti
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lpeidro created an issue. See original summary.

eduardo morales alberti’s picture

Assigned: Unassigned » eduardo morales alberti
eduardo morales alberti’s picture

Version: 1.x-dev » 2.x-dev

eduardo morales alberti’s picture

Status: Active » Needs review
StatusFileSize
new111.69 KB

Ready to review:
Example target href

eduardo morales alberti’s picture

Solved also wrong links on D3 when clicks the nodes

nitinkumar_7’s picture

Reviewed the lattest changes and tested locally
The URL resolution looks good, using Url::fromUri() with a try/catch is the safe way to handle this and the fallback behavior is sensible.

It may not be worth making the ftp, ftps, tel, and mailto schemes clickable. Modern browsers no longer support ftp and ftps, tel links have limited usefulness on desktop, and mailto links don't provide much value.

So i would recommend restricting the clickable schemes to http and https.

lpeidro’s picture

Hello Edu.

MR reviewed and functionality checked locally.

Just a suggestion regarding making the ftp, ftps, tel and mailto schemes clickable. FTP and FTPS are no longer supported by modern browsers, tel links do nothing on desktop, and mailto links add no real value in this context.

Consequently, I would suggest restricting the clickable schemes to http and https.

The merge request is ready to merge.

eduardo morales alberti’s picture

Update MR to limit the ALLOWED_SCHEMES to https and http.
Thank you, @lpeidro!

eduardo morales alberti’s picture

Assigned: eduardo morales alberti » Unassigned
eduardo morales alberti’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

nitinkumar_7’s picture

Hi @eduardo-morales-alberti
I noticed I wasn't credited for this issue. Would you mind adding issue credit for my contribution if you think it's appropriate? Thanks!

eduardo morales alberti’s picture

@nitinkumar_7 Added to the contribution record