P url

Purpose: Outputs a URL-encoded string.

 p-url <string> [ length <length> ]  [ new-line ]

p-url is the same as p-out, except that the output is URL-encoded. This means such output is suited for use in URL parameters.

If "length" clause is used, then only <length> leading bytes of <string> are URL-encoded and then output.

If "new-line" clause is used, then a new line ("\n") is output after encoded <string>.
Examples
Create a URL based on arbitrary strings used as URL parameters - for instance a space would be encoded as "%20" in the final output:
 @<a href='<<p-path>>/update?item=<<p-url item_name>>'>Update</a>

See p-out for more examples.
See also
Output
finish-output  
flush-output  
output-statement  
pf-out  
pf-url  
pf-web  
p-num  
p-out  
p-path  
p-source-file  
p-source-line  
p-url  
p-web  
See all
documentation


Copyright (c) 2019-2024 Gliim LLC. All contents on this web site is "AS IS" without warranties or guarantees of any kind.