http://qs321.pair.com?node_id=328549


in reply to Re: Re: Site HTML filtering, Phase II
in thread Site HTML filtering, Phase II

When you do, [ is not difficult to type, or to remember.

I want to live in your universe.

When I was an Initiate (and a Novice, and an Acolyte...), I kept [ on my scratchpad, so that I had an easy way to find it. However, I discovered that however I put it, it would either be visible when I viewed my scratchpad in a textedit box, or else it would be visible when I viewed it the regular way. So I put it both ways (with the ampersand escaped or not). I was hoping that eventually I would just remember it, but I keep getting it confused with the entity for single quote (which I *have* to remember, for non-Perl work-related reasons), confusing it with other random ASCII character numbers, and otherwise mixing it up and getting it wrong. So I had to consult my scratchpad for the correct number nearly every time.

Eventually I needed my scratchpad for something else, so I gave up and started putting the left square bracket in code tags, which was so much easier (not having to consult my scratchpad every time I post anything) that I instantly became addicted to it. This is where I stood until this thread; now I have arranged to have the entity in my signature for easy reference :-)

If there were an easy pseudoentity for it, such as &lbracket;, I would use that instead. Or maybe *eventually* I'll memorize the numerical code for left square bracket, but with all the other ASCII codes floating around in my head for one reason or another, that one has a tendency to get lost.

I know what space and carriage return and linefeed are decimal and hex. In decimal I also know what double quote is, and single quote, and tab, BEL, and the letter a. I can never seem to remember A though, and I always have to work out z by adding to a. The left square bracket I have rememorized probably tweny times (every single time just for PerlMonks; it is not a character that there is *normally* a reason to memorize), but it always gets lost again.
I guess I don't use it quite often enough. Plus, numbers are much harder for me to remember than words.

The real problem with escaping the left square bracket, though, is for newbies. The entity for it is (not surprisingly) not on *any* of the usual lists of HTML entities. It's not on the htmlhelp.com lists, not on the w3schools lists, nowhere. Nor is it documented in the FAQ here. You've got to drag out an ASCII chart. This is not newbie-friendly. update:Hmmm... It *is* listed in the "how to escape" thingy that's linked from preview, though; how come I never noticed that before? I could have saved myself all that messing around with my scratch pad.


;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print