Skip to content

[Bug]: Forced Protocol #78

Description

@sepandhaghighi

Contact details

me@sepand.tech

What happened?

When a link does not have a protocol (for example, www.test.com), MyButton adds http:// at the beginning of the link.
I recommend taking steps to prevent link manipulation.

Steps to reproduce

Input:

  1. Link: www.test.com
  2. Title: Test
  3. Service: Email

Expected behavior

<div>
		<a href="mailto:?subject=Test&body=www.test.com" target="_blank"><img src="https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/email.svg" width="32" height="32" style="background-color:#888990; border-radius:4px"/></a>
</div>

Actual behavior

<div>
		<a href="mailto:?subject=Test&body=http%3A%2F%2Fwww.test.com" target="_blank"><img src="https://github.com/openscilab/mybutton/raw/main/src/Assets/icons/services/email.svg" width="32" height="32" style="background-color:#888990; border-radius:4px"/></a>
</div>

Device type

Desktop

Browser

Chrome

MyButton version

MyButton 0.6

Relevant log output

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions