I dunno... it's a bit confusing, since you can't meaningfully test some of the encoding functions on the cli (it appears to interpret entities before running the ash function, at least based on what's shown... but since the gCLI is html-like it's really hard to tell).
All I know for sure is that if I put a plus sign in a textarea, it turns into a space before I can do anything about it. If this is a Firefox issue, I don't know what to do... but apparently KoL has a workaround, as kmails containing a plus sign are roundtripped just fine. But I suppose it's possible they use javascript to check the user agent & perform the same switcheroo that I'm doing now.
For reference, here's a summary of what I do:
PHP:
import "htmlform.ash";
void main() {
write_header();
finish_header();
attr("id=\"copypasta\"");
write_textarea(fields["copypasta"],"copypasta","",100,30);
write_button("parseHistory","Load");
string h = fields["copypasta"];
for x from 0 to length(h)-1 {
print(char_at(h,x),"purple");
}
finish_page();
}
if the text I type into the textarea is:
I can't seem to find a way to NOT end up with:
Unless I make use of javascript.
Edit to add; tested in Firefox 3.6.13 & Internet Explorer 8