Forum OpenACS Development: Interpreting message keys in string variables annoying bug!

I put an en dash – html entity into a variable and
got this error.

can't read "::lang::util::percent_match(-)": no such element in array
while executing
"append compiled_string "${done_portion}$::lang::util::percent_match($percent_modifier)""
("default" arm line 2)

Quite annoying.

Does anyone have any ideas on how to fix this? Automatically scanning any random string for a message key seems to cause strange annoying bugs.

Actually I lied, i had a different bug. HTML entity is OK, but I often find bugs when user enters content with hash marks in it, so the underlying complaint still stands.