Skip to content

Bookmarklet strips + in long URL #3523

@ozh

Description

@ozh

Discussed in https://github.com/orgs/YOURLS/discussions/3522

Originally posted by LtCmdrKeene February 14, 2023
I discovered an issue when I use the YOURLS browser bookmarklet tool to quickly create a shortlink to the page I'm viewing.

I have the bookmarklet "installed" to my browser toolbar with this code as expected (directly from the YOURLS tools page).

When I create a link with it, any + marks that existed in the original URL are removed.
So https://www.bing.com/images/search?q=list+all+modes+screenshot&form=HDRSC4&first=1
becomes https://www.bing.com/images/search?q=listallmodesscreenshot&form=HDRSC4&first=1
which is of course broken.

If I copy the original URL and create it in YOURLS myself by pasting in the admin page, the created link does not lose the spaces.

This makes me believe there is a flaw somewhere hidden in the bookmarklet code, but I'm not skilled enough to know how to debug that.

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