If the user gets to see the modded HTML before it's saved, I have no real problem. Coming back on edit and finding something different from what you put in is what I think is wrong.
'Time Bomb'
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.
Eh. I have mixed feelings on the issue. What if I can't figure out what I've done wrong? Will it never post, causing me to be frustrated and discard my thought? I guess as long as I can accept some kind of "we tried to tidy and this is what we got" I suppose it's not that bad.
On the other side of it, I agree with ita that I'm generally unhappy to come back on edit and find my post not what I posted. Hell, I get grumpy at web editors for sticking their damn name in my damn page, even when I knew up front that would be happening.
Anyway. Mixed feelings. But on the whole, it's a good thing. It's good to be (lowercase) tidy.
What if I can't figure out what I've done wrong? Will it never post, causing me to be frustrated and discard my thought?
Not at all. With my suggestion, Tidy and Gus' enhancements will suggest a correction and display what the auto-corrected text will look like. It's up to you to accept the changes and hit post, or try to fix it yourself. The only alternatives I've seen are a) have Tidy, etc. fix the post and post it without any intermediate input from the poster, or b) do nothing and have the malformed html post as is (the current state).
The tidy alternatives proposed are -- have it fix it in the database or have it saved as entered, and fix it every time it's displayed (with a note visible only to the post owner).
When clarified like that, I lean towards on display. Then I can correct it myself, right?
I'm one of those people who never uses a preview option, even when offered. I make my mistakes for the whole internet to see, 'cause I'm too damned impatient to wait for a whole 'nother click-through screen. My dial-up is sometimes painfully slow. Of course, I don't want my mistakes to broke nothin', so it's all good.
I think I'd rather have the post fixed at the database rather than having to fix it every time it's displayed. That seems wasteful of resources.
I, OTOH, am pretty adamant about not wanting what I typed changed, if not by me or a stompy. It's a thing that transcends my resource concerns.
Here's the flow I'm imagining:
- Poster types a post and submits it.
- Post gets saved to a temporary variable and gets run through TidyPlus.
- If TidyPlus does nothing, post gets posted. End of story.
- If TidyPlus finds errors, it writes a suggested fixed post to another temporary variable.
- A page that looks somewhat like editpost.php is loaded. Near the top of this page is displayed how the Tidy'ed post will look. Below that is one or maybe two multiline text boxes.
- If it's one box, it could contain either the text of the original post or the text of the Tidy'ed post. The poster either makes changes to the post or (only if it contains the Tidy'ed text) accepts the changes as is and hits submit.
- Another option is to have two text boxes and two submit buttons -- one box and button with the original text and one with the Tidy'ed text. The poster could change or accept the text in either of the two text boxes, and then hit submit below the text box containing the text they want to post.
- If the resubmitted post still has html problems, the process begins anew.
If the resubmitted post still has html problems, the process begins anew.
The theory being that crap is never allowed through?
Exactly. Why would we want something posted that will mess up other posts or the entire showthread.php page?