A
A
Alexander2017-05-09 00:17:44
JavaScript
Alexander, 2017-05-09 00:17:44

Cyrillic URL decoding when copying from the address bar. Is it possible to?

I use the Cyrillic domain and paths on the site. Everything would be fine, if not for a single BUT. When copying a url from the address bar in some browsers, it is copied encoded. When pasted on sites, it looks very doubtful. Javascript has a decodeURI method, but I don't fully understand how to apply it in this case. I know that there are crutch ways to copy the necessary information to the clipboard. The question is how to catch the moment when the URL was copied and how to get it and return it (preferably without crutches). Is it even worth it to do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
riot26, 2017-05-09
@riot26

If for yourself - you just need to add a space after the link in the address bar, then copy. If for users - only change the domain.

D
Defman21, 2017-05-09
@Defman21

Javascript has a decodeURI method, but I don't fully understand how to apply it in this case.

No way.
No way.
No. Leave it to the browsers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question