Simon: Captain's a good fighter, he must know how to handle a sword. Zoe: I think he knows which end to hold.

'Shindig'


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


John H - Nov 17, 2002 2:04:10 pm PST #1539 of 10000

What do you think about some kind of "Safe Mode" means of editing, ita, like I mentioned a few posts back?

There must be some way in which we can put the bad code in a sandbox so it stops being part of the page, like replacing the HTML brackets with [[[tag]]] or something?

Having to go into the database by hand is a bit scary. You're the only person who can do that, right?


Jon B. - Nov 17, 2002 2:09:46 pm PST #1540 of 10000
A turkey in every toilet -- only in America!

Ummm... guys.... I messed up. All those URL-encoded entities were added by Mozilla when I downloaded the page to my HD. Here's what the page really looks like.

I blame the tequilla.


John H - Nov 17, 2002 2:14:02 pm PST #1541 of 10000

OK thinking about ways of checking for problematic HTML.

I've got two methods I've played with (in Perl).

  1. every time we find an opening tag, we push it onto an array; every time we find a closing tag, if it's the closing tag which matches the last item of the array, we remove the last item of the array; a good result is an empty array, but if it's not empty, we add closing tags, in reverse order of course, to the post.
  2. every time we find an opening tag, we increment the number of that tag in a hash, so we have %hash{number_of_open_a_tags} = x; every time we find a closing tag we decrement that number; a good result is all tags at zero; but if they're not zero, we need that many closing tags added to the post

Problems with A: it won't work correctly with crossed tags, like this:

<b> something in bold <i> something in bold and italic </b> no longer bold, but still italic </i>

it'll get out of step, but the HTML, despite being Very Bad In Principle, won't actually be problematic for the page as a whole.

Problems with B: no maintaining of order, because it's a hash.


Jon B. - Nov 17, 2002 2:18:38 pm PST #1542 of 10000
A turkey in every toilet -- only in America!

If you looked at the page a few minutes ago, I just resaved it while logged in as an admin. I realized that the "edit" link wasn't showing up because I hadn't written the post. Anyway, now the edit link is showing up, and it works! So I don't know why ita couldn't edit the post originally. The mystery deepens!


John H - Nov 17, 2002 2:21:07 pm PST #1543 of 10000

OK my analysis of that bad link is this:

<a href='http://story.news.yahoo.com/ news?tmpl=story2&cid=300&e=17&u=/ibsys/20021108/lo_wisc/1382225">Try this.</a></p><hr align="LEFT" size="2" width="75%" noshade><p class='normal-text'>

It's an opening A tag:

<a

then a very long, busted attribute:

href='http://story.news.yahoo.com/ news?tmpl=story2&cid=300&e=17&u=/ibsys/20021108/lo_wisc/1382225">Try this.</a></p><hr align="LEFT" size="2" width="75%" noshade><p class='

then an unknown attribute (as the browser sees it)

normal-text'

and then finally the closing bracket:

>


brenda m - Nov 17, 2002 2:22:57 pm PST #1544 of 10000
If you're going through hell/keep on going/don't slow down/keep your fear from showing/you might be gone/'fore the devil even knows you're there

(unless it's a mandatory part of the post message function)

Whatever the solution t clueless , please don't let it be this.


Typo Boy - Nov 17, 2002 2:37:02 pm PST #1545 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

OK a possible solution: check for bad HTML. Don't try to correct. If the HTML is bad simply refuse to post, and give the user an error message. You catch, put the burden on the user to fix it.

This could be unclosed tags, unclose quotes of various types, and too many quotes of the same type in an < A Href > tag.


Noumenon - Nov 17, 2002 2:40:14 pm PST #1546 of 10000
No other candidate is asking the hard questions, like "Did geophysicists assassinate Jim Henson?" or "Why is there hydrogen in America's water supply?" --defective yeti

For me, the fact that "post message" takes you back to the thread serves as the preview function. I narcissistically reread all my posts, and don't have broken HTML for longer than it takes me to edit.