Hauser: You really think you can solve the problem? Come into Wolfram & Hart and make everything right? Turn night into glorious day? You pathetic little fairy. Angel: I'm not little.

'Just Rewards (2)'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


John H - Nov 17, 2002 1:01:21 am PST #1529 of 10000

I'm 99% certain you can't next tags like that.

That's OK because I'm 100% certain you can't. But there's nothing but nesting if you just mean:

<b> blah blah <i> blah blah </i></b>

once you see one sort of quote, you'll need to ignore occurences of the other. In other words, double quotes found between pairs of single quotes are normal, as are single quotes found between pairs of double quotes.

Well there shouldn't be that kind of nesting in regular HTML, though you'll get it in JavaScript for sure.

I could hack together some perl that does the checking, if that would help.

When I said I was working in Perl, I should have said "but of course this board uses PHP" -- have you ever done PHP? If you've worked in Perl it will be no big deal.


Jon B. - Nov 17, 2002 1:10:17 am PST #1530 of 10000
A turkey in every toilet -- only in America!

Betsy's post with the mismatched quotes? The one that broke the board and ita had to edit by hand? It was particularly devious. If you look at the resultant html in the page, it's not at all obvious how it ended up the way it did. ita reproduced the problem in our test environment. I took the page and copied it into a "regular" html page. You can look at it here. It's post #4 that broke things. I'd analyze it some more, but it's amazing what a few shots of tequila can do to one's analytical abilities.


Rob - Nov 17, 2002 1:21:56 am PST #1531 of 10000

I looked at the broken post, and it's not a case of too few quotes. Instead, it's someone includingn a URL that uses double-quotes.

If this anchor tag was handwritten by the author of the post, I don't think we can do anything about it. If instead it was created by the code that automagically wraps anchor tags around URLs, then the code needs to detect single or double quotes in the URL and use the other kind of quote.

The quote counting is still a good idea, but it won't fix this problem.


John H - Nov 17, 2002 1:35:00 am PST #1532 of 10000

I can't tell what's happening from that post. I don't seem to be looking at the original, it seems like it's a URL-encoded version of it.

But it's definitely because of quotes that are opened and don't close, around the URL. for sure. I'm not sure what you're saying about that Rob, but what happens is, as I said earlier to Gar, if you've opened quotes, but not closed them, in a link, you've got a link to the entire remaining text of the page, haven't you?

The problem is, really really broken HTML, and what the browser chooses to do about it. Lots of browsers just auto-close unbroken tags at the end of a TD or TABLE.

We could just tell people to be careful?


Cindy - Nov 17, 2002 4:15:33 am PST #1533 of 10000
Nobody

While reaffirming that I love this board beyond belief, this is where I'd gently like to request the ability to preview posts. Not everyone will use it (unless it's a mandatory part of the post message function) - but most infamous tag-droppers (hi - my name is Cindy) probably would. It would put some of the responsibility for tags gone bad - back on the posters. I guess it wouldn't show that certain open tags could break the board though.

The bronze beta is coded so that if any tag that is supposed to be closed is left open, the carat converts to a bracket and the tag isn't activated. For example, if I intended to put "John H" in bold, but only put the opening b tag, what I'd see, either when I previewed or posted, would be [b]John H[/b] - which tells me I didn't close the tag, and so "John H" does not appear as bold.

I have no technical knowledge, so I don't know if that's feasible for you.


Rob - Nov 17, 2002 10:30:18 am PST #1534 of 10000

I'm sorry I was so unclear in describing the problem. I think the post Jon links to it a problem with bad HTML generated by Phoenix. That we can fix.

Here's the bad link, made harmless:

<p>Your modem too slow? <a href="http://story.news.yahoo.com/%20news?tmpl=story2&
cid=300&e=17&
u=/ibsys/20021108/lo_wisc/1382225%22%3ETry%20this.%3C/a%3E%3C/p%3E%3Chr%20
align=%22LEFT%22%20size=%222%22%20width=%2275%%22%20
noshade%3E%3Cp%20class=" normal-text="">
</a>

Note how the link has an attribute (class=) that uses double quotes as delimiters. If a Phoenix user were to try to paste such a link into a message, it's my theory that Phoenix will wrap the entire URL with double quotes, which doesn't work.

OK, I still would like to make sure the URL converter handles links with quotes in them correctly, but I can't say for sure that's the only thing wrong with the post Jon linked to. I think the HTML there is already corrupted by the bad link.


Rob - Nov 17, 2002 10:49:12 am PST #1535 of 10000

When I said I was working in Perl, I should have said "but of course this board uses PHP" -- have you ever done PHP? If you've worked in Perl it will be no big deal.

Nope, what little CGI work I've done has been done in Perl. But from what I read about PHP, I think you're right about it being no big deal.


Jon B. - Nov 17, 2002 11:18:16 am PST #1536 of 10000
A turkey in every toilet -- only in America!

Note how the link has an attribute (class=) that uses double quotes as delimiters.

The class attribute isn't supposed to be a part of the link. in fact, everything after the "Try%20this" looks like some weird-ass converted entities that should have been in the html that normally follows a post, notably the t hr tag and the header the post following.


John H - Nov 17, 2002 1:28:43 pm PST #1537 of 10000

Jon's right, Rob, you've misinterpreted it a little -- see that "%3E" part?

That's the closing bracket of the tag, or rather the URL-encoded version of it, so that part is really

>try this

and the rest of the page is caught up in it. I don't know why it's got encoded or half-encoded or whatever.

I agree with Cindy that previewing is a good idea. At another site I use you're not allowed to post right away, you must preview at least once. You don't get much help, just "Doesn't look like you expected? Maybe you'd better read the HTML Tips" but still, it does help you find and correct mistakes.


§ ita § - Nov 17, 2002 1:40:22 pm PST #1538 of 10000
Well not canonically, no, but this is transformative fiction.

But if we preview a very broken post, we'll be in the same place where we couldn't edit Betsy's post.

Previewing less broken posts could be good, but it also won't catch unclosed tags that happen at the end of the post.

So we'll still have to caveat heavily.