0

I am trying to copy this url:

https://preview.themeforest.net/item/byron-construction-and-engineering-wordpress-theme/full_screen_preview/28520387?_ga=2.75926102.272258780.1641055757-495160342.1640239713&_gac=1.183025236.1641058506.Cj0KCQiAlMCOBhCZARIsANLid6agL3jaSAir1_krVJwUfbyNOb4FdawehBgKdBLPg-pXSqElt6vrEmQaAukMEALw_wcB

but after copying the url, amp; gets omitted:

https://preview.themeforest.net/item/byron-construction-and-engineering-wordpress-theme/full_screen_preview/28520387?_ga=2.75926102.272258780.1641055757-495160342.1640239713&_gac=1.183025236.1641058506.Cj0KCQiAlMCOBhCZARIsANLid6agL3jaSAir1_krVJwUfbyNOb4FdawehBgKdBLPg-pXSqElt6vrEmQaAukMEALw_wcB

Inside a .webloc file, the url works with & or without it but not with just the & symbol, which it ends up with after copying.

How do I get it copied properly? Without it my webloc file doesn't work.

This is part of a Keyboard Maestro macro.

Edit:

KM support proposed to me to use a %ChromeURL% token instead of the clipboard but the problem persists. Here's the macro:

enter image description here

I know that this question is about the clipboard but both problems seem to be provoked by the same issue. Solving one will prolly solve the other.

5
  • Interesting case for stirring encoding. Is this URL in a pages document or text edit? When I copy that URL from this page using safari app - the ampersand is not encoded here and I presume that’s since it’s a valid ascii character and can be UTF-8 or otherwise encoded (HTML escape in your case) but doesn’t have to be encoded. url-encode-decode.com
    – bmike
    Commented Jan 2, 2022 at 16:18
  • In Keyboard Maestro, I create a .webloc file and write text to it. Commented Jan 2, 2022 at 20:54
  • If you copy the URL manually from Chrome (select in location bar and press cmd-c), and the paste it into a text file, does the full URL get copied?
    – nohillside
    Commented Jan 2, 2022 at 21:13
  • @nohillside it gets copied without the amp; Commented Jan 3, 2022 at 9:35
  • So the problem seems to be rather be with Chrome itself and not related to Keyboard Maestro. Might be helpful to edit the question to avoid answers which focus on the KM part. Do you have an extension installed maybe which removes this part?
    – nohillside
    Commented Jan 3, 2022 at 9:40

1 Answer 1

1

I’m not entirely certain how to reproduce this, but if you have this URL passing through keyboard maestro, you could do a search and replace to change the clipboard contents.

https://wiki.keyboardmaestro.com/action/Search_and_Replace

I realize this may not be a good fix if you don’t want to build up all the possible HTML substitutions and this is but one issue you face in a larger problem space.

2
  • Unfortunately not a practical solution since there are far too many url combinations out there to scan for characters. Nonetheless thank you for your effort ;-) Commented Jan 2, 2022 at 21:02
  • For sure. It’s never easy with XY type problems where we try to answer how to perform a proposed solution rather than attacking the core issue - an edit of the main post should help people understand why chrome app is putting that string into the pasteboard
    – bmike
    Commented Jan 3, 2022 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .