Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Site HTML filtering, Phase II

by theorbtwo (Prior)
on Feb 11, 2004 at 16:05 UTC ( [id://328299]=note: print w/replies, xml ) Need Help??


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

There is only one "tag" that behaves differently on PM vs elsewhere, and that is <code>. <readmore> is an additional pseudo-tag, but has no meaning in normal HTML. (In fact, we make use of the fact that it is meaningless in normal HTML.) I have no idea what behavior you're seeing with <a>; if you give me further information, I can attempt to explain. Perhaps you'll trying to put it in a place where all HTML is escaped.

As to <code>[</code> being difficult to type, you're correct, it is. However, it's rare to mention the [ character all by it's lonesome. When you do, &#91; is not difficult to type, or to remember. Code tags are useful semantic information, and allow for better visual cues. Please, don't abuse them for formatting.

Allowing input-as-POD, or another semi-plaintext format is easy to do wrong and difficult to do right. So far, we've done pretty well, I think, at not doing things wrong.

Having a tag like code that says "things inside this tag are PODish" is an interesting idea, and I may get around to taking a look into it at some point, but many, many, many things are higher up on my todo list.


Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

Replies are listed 'Best First'.
Re: Site HTML filtering, Phase II
by Abigail-II (Bishop) on Feb 11, 2004 at 16:17 UTC
    <a href = "http://people.ku.edu/~nkinners/LangList/Langs/P/PEARL1.htm">Try this. I've also have had problems in the past where the only way to get an <a> element to be accepted was to remove the spaces surrounding the =, but I can't remember exactly where I tried to link to, and I can't reproduce it.

    Abigail

      Ah, thanks. My initial diagnosis is that the bracket expansion is happening first, and then the html screening, and the screening after, and you're ending up with quote-within-quote problems, which the html screener throws it's hands in the air about. This could be completely wrong. In any case, URI-encoding or HTML-encoding the inital [ fixes it. I may use this as a test case to unravel tye's new code at some later point; I suspect figuring out just what goes wrong and how to fix it will take me on a nice tour of the code.


      Warning: Unless otherwise stated, code is untested. Do not use without understanding. Code is posted in the hopes it is useful, but without warranty. All copyrights are relinquished into the public domain unless otherwise stated. I am not an angel. I am capable of error, and err on a fairly regular basis. If I made a mistake, please let me know (such as by replying to this node).

      Tricky URL to try to link to. You could escape the brackets in the URL and use <a href=""> or the Monastery "in-house" brackets:

      [http://people.ku.edu/~nkinners/LangList/Langs/P/PEARL%5B1%5D.htm]
      yields
      http://people.ku.edu/~nkinners/LangList/Langs/P/PEARL%5B1%5D.htm

      But i am afraid that linking via [http://people.ku.edu/~nkinners/LangList/Langs/P/PEARL[1].htm] is not possible, not even with <a href=""> ...

      But i did make a link to the page. ;)

      jeffa

      L-LL-L--L-LL-L--L-LL-L--
      -R--R-RR-R--R-RR-R--R-RR
      B--B--B--B--B--B--B--B--
      H---H---H---H---H---H---
      (the triplet paradiddle with high-hat)
      
Re: Site HTML filtering, Phase II
by jonadab (Parson) on Feb 12, 2004 at 13:12 UTC
    When you do, &#91; 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 &#91; 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 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

      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 &lsqb; and &rsqb; are the SGML entity names.

        Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found