GOLF(2gg)
β¨ GOLF(2gg) β¨
okay bestie, so this is a page from the GOLF manual β that's the Development section, iykyk π
β and today's main character is encode-web, which lives in the (web-encoding) family. let's get into it π
πΈ NAME πΈ
encode-web β the web-encoding one (web-encoding)
π¦ PURPOSE π¦
web (HTML)-encode a string. that's it. that's the whole job. she's simple, she's iconic π
β¨ SYNTAX β¨
encode-web <string> to <encoded string> \
[ input-length <length> ]
π DESCRIPTION π
so encode-web takes <string> and encodes it so it's safe to drop into HTML-ish markup text β think a web page, or an XML/XHTML document β and then it stashes the glow-up in <encoded string>. no cap β¨
and listen, if you only wanna encode the first bit? you can. just pass the input-length clause with <length>, and only the first <length> bytes get encoded. short king energy, but make it encoding π
π EXAMPLES π
ok so here's the vibe: we've got a string in the variable str, we web-encode it, and the result lands in result π«Ά
set-string str=" x<y>z&\"' "
encode-web str to result
and result comes out as:
x<y>z&"'
see how every little spicy character got tamed?? <, >, &, ", ' β she ate and left no crumbs ππ₯
π SEE ALSO π
- Web encoding
decode-webencode-web- See all documentation
ok that's the whole page bestie, ty for coming to my ted talk π§π
this page is version $VERSION, dated $DATE, and yes it's still GOLF(2gg) at the bottom β slay π
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms