Did you mean to search for the term url-encode?
xdmp:url-encode( $plaintext as xs:string, [$noSpacePlus as xs:boolean?] ) as xs:string
Converts plaintext into URL-encoded string. To decode the string, use xdmp:url-decode.
There is also a W3C function that does a slightly different url encoding: fn:encode-for-uri.
Parameters | |
---|---|
plaintext | Plaintext to be encoded. |
noSpacePlus | True to encode space as "%20" instead of "+". |
xdmp:url-encode("Why not?"); => "Why+not%3f"
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.