You can also use the uri quasiquote pack (probably soon to be moved to libs)
|Did you know ...||Search Documentation:|
:- use_module(library(url)).(can be autoloaded)
alnum(see code_type/2)), and one of "-._
~" using percent encoding. Newline is mapped to
%OD%OA. When decoding, newlines appear as a single newline (10) character.
Note that a space is encoded as
%20 instead of
Decoding decodes both to a space.