Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Site HTML filtering, Phase II

by jonadab (Parson)
on Feb 12, 2004 at 13:12 UTC ( #328549=note: print w/replies, xml ) Need Help??

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 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

Replies are listed 'Best First'.
Re: Re: Site HTML filtering, Phase II
by theorbtwo (Prior) on Feb 12, 2004 at 13:32 UTC

    OK, perhaps I'm overstating it a bit. It's not that much harder then &lsb;, &lbracket;, &ob;, or whatever, would be, and has the advantage of being a real HTML entity, and not something we just made up.

    It took me a long time to be able to remember it too.

      Some googling seems to indicate that [ and ] are the SGML entity names.


        Some googling seems to indicate that [ and ] are the SGML entity names.

        Some testing seems to indicate that Gecko doesn't support these, which probably means nothing else does either. Maybe I'll just put #91 in my sig...

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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://328549]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-08-16 02:00 GMT
Find Nodes?
    Voting Booth?

    No recent polls found