Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to insert the percentage sign into a local URL

Tags:

html

hyperlink

Good day

I wanted to have a general URL to access the Desktop of the local machine for every local user, but when I put this link into the shared HTML page:

href="file://%userprofile%\Desktop"

the URL that appears on the browser is:

file://%25userprofile%25\Desktop

How to remove that '25' so every local user can access his/her Desktop?

Thank you very much

like image 366
João Pimentel Ferreira Avatar asked Apr 03 '12 11:04

João Pimentel Ferreira


2 Answers

% is a special character on the URL - it is used to encode special characters, giving their HEX ASCII value as result.

Hence, in order to pass a % on the URL, you need to encode it - this results in %25 - the browser is doing the right think and you don't need to do anything.

I am not sure the browser can interpret local environment variables, by the way - it may also not have direct access to the user desktop.

like image 158
Oded Avatar answered Nov 05 '22 18:11

Oded


Use %25 without space. it will show the percent symbol in the url.

like image 1
Tabish Avatar answered Nov 05 '22 17:11

Tabish