Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link rewrite does not adjust link text #450

Open
tripodsan opened this issue Nov 6, 2023 · 2 comments
Open

link rewrite does not adjust link text #450

tripodsan opened this issue Nov 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@tripodsan
Copy link
Contributor

tripodsan commented Nov 6, 2023

Description
if the link text and href are the same, eg

<a href="https://main--adobe--helix-website.hlx.page/foo">https://main--adobe--helix-website.hlx.page/foo</a>

current behaviour
currently it does not alter the link text:

<a href="/foo">https://main--adobe--helix-website.hlx.page/foo</a>

expected behaviour

the link rewriter should also adjust the link text accordingly to:

<a href="/foo">/foo</a>
@tripodsan tripodsan added the bug Something isn't working label Nov 6, 2023
@davidnuescheler
Copy link

this will definitely break a lot of client side code, and it is really as designed, as we are not really rewriting content... i think a less dangerous change would be to rewrite to:

<a href="/foo">https://<prod-domain>/foo</a> on main--helix-website--adobe.hlx.live and to <a href="/foo">https://<ref>--helix-website--adobe.hlx.[page|live]/foo</a> everywhere else, not sure that love that though.

i definitely don't want to go back to a place where we use xfh and a vary header.

@kptdobe
Copy link

kptdobe commented Jan 24, 2024

hlx.page or hlx.live appear on a lot of pages (view source) because of this incomplete rewrites.

See https://www.google.com/search?q=a+%22hlx.page%22 and https://www.google.com/search?q=a+%22hlx.live%22
Nothing critical but the source is not "nice". Quickly looks at some sites like express, bitdefender, blog.adobe.com... I see:

  • fragment block (list of links)
  • video block (link to video)
  • svgs (link to image)

Again, the href is relative, only the link text show hlx.page, nothing visible on the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants