
how-to block ads
|
  cacroll Eventually, Prozac becomes normal Premium join:2002-07-25 Martinez, CA
| reply to Johnny Re: Allow the use of less than sign in forum posts
said by Johnny :Any parser should be able to tell that a left angle bracket by itself is not HTML and ignore it.
Define "by itself". Do you mean unpaired, or surrounded by spaces?
If the former, the parser would have to scan the entire message that you're writing, to check for pairs of < and > ? If the latter, you could write "if a < b" but couldn't write "if a<b"? -- Cheers, Chuck MS-MVP 2005-2007 [Windows - Networking] PChuck's Network | |   Johnny Premium join:2001-06-27 Atlanta, GA
| said by cacroll :said by Johnny :Any parser should be able to tell that a left angle bracket by itself is not HTML and ignore it. Define "by itself". Do you mean unpaired, or surrounded by spaces? I mean without being part of a valid HTML expression.
If the former, the parser would have to scan the entire message that you're writing, to check for pairs of < and > ? If the latter, you could write "if a < b" but couldn't write "if a<b"? It has to scan it anyway, to look for the expression that it must assume the left angle is a part of. As you said, if it reaches the end without identifying a valid expression, it can either throw an error, throw away the text scanned up to that point (which is what it is doing now), or treat the text scanned as plain text.
The feature request is to treat scanned text that does not constitute a valid HTML expression as plain text and just output it.
The same is true for square brackets - the metalanguage or BNF for them is fairly limited, so it isn't hard to determine if the characters following a left bracket are making a valid expression. As soon as the first invalid character is encountered, it can bail and treat it as plain text. | |   cacroll Eventually, Prozac becomes normal Premium join:2002-07-25 Martinez, CA
| said by Johnny :said by cacroll :said by Johnny :Any parser should be able to tell that a left angle bracket by itself is not HTML and ignore it. Define "by itself". Do you mean unpaired, or surrounded by spaces? I mean without being part of a valid HTML expression. If the former, the parser would have to scan the entire message that you're writing, to check for pairs of < and > ? If the latter, you could write "if a < b" but couldn't write "if a<b"? It has to scan it anyway, to look for the expression that it must assume the left angle is a part of. As you said, if it reaches the end without identifying a valid expression, it can either throw an error, throw away the text scanned up to that point (which is what it is doing now), or treat the text scanned as plain text. The feature request is to treat scanned text that does not constitute a valid HTML expression as plain text and just output it. The same is true for square brackets - the metalanguage or BNF for them is fairly limited, so it isn't hard to determine if the characters following a left bracket are making a valid expression. As soon as the first invalid character is encountered, it can bail and treat it as plain text.
I guess all that depends upon what "it" is. If the forum software allows plain old HTML, it's probably just an HTML exit. The HTML isn't checked, or rendered by the forum software, it's rendered by your browser when it's displayed.
As I pointed out to Joako, it's not that the forum software is preventing him from doing anything. The forum software lets him enter anything he wants to - just like most HTML based web page editors. The browser is the problem, when the post is rendered. If you have a "<" in the code without a closing ">", almost any thing can happen. But it's a browser problem, not the forum problem. -- Cheers, Chuck MS-MVP 2005-2007 [Windows - Networking] PChuck's Network | |
|