Skip to content

Double https:// on copy (https://https://my-url.xx/link) #934

@Wyral

Description

@Wyral

Bug Description

When using the copy function on the dashboard, the copied link is malformed.
Instead of a valid URL, the copied value is prefixed with https://https://, which makes it invalid in browsers (e.g., https://https://my-url.xx/link).

Expected Behavior

Clicking the Copy button should copy a valid URL such as: https://my-url.xx/link

Actual Behavior

The copied URL looks like this: https://https://my-url.xx/link

This prevents users from pasting it directly into a browser.

Why I Think It’s a Frontend Issue
• The backend db appears correct.
• Inspecting the rendered HTML shows that both versions can be found (https://https://).

<td class="short-link right-fade">
  <div class="clipboard small">
    <button aria-label="Copy" 
            hx-on:click="handleShortURLCopyLink(this);" 
            data-url="https://https://rbls.app/LtLK8b">
		<!-- This is wrong ↑ -->
      <svg>
	...
      </svg>
    </button>
    <svg>
	...
    </svg>
  </div>
  <a href="https://https://rbls.app/LtLK8b" target="_blank" rel="noopener noreferrer">
		<!-- This is wrong ↑ -->
    https://rbls.app/LtLK8b
<!-- This is right ↑ -->
  </a>
</td>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions