Okay, I found the configuration -- and you can kinda use both docs, it seems.
$html = '<b><i>test</p></table>';
$config = array('show-body-only' => true);
$tidy = tidy_repair_string($html,$config);
gives
<b><i>test<br>
<br></i></b>
Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.
Okay, I found the configuration -- and you can kinda use both docs, it seems.
$html = '<b><i>test</p></table>';
$config = array('show-body-only' => true);
$tidy = tidy_repair_string($html,$config);
gives
<b><i>test<br>
<br></i></b>
Whoa! That's very cool!
I would be interested in hearing how they finally got the damn thing installed, ita.
They got updated RPMs from Plesk that cleared up the system version inconsistencies, and then the compilations worked just like advertised.
My thinking is that after we've parsed the quickedits into HTML, we then pass the result through tidy -- making sure our parsing makes nice and compliant HTML.
In fact, with the tidy library, you can run it through and see if it has errors, and put a little tsk-tsk note where the poster can see it.
Or not -- it was an idea that amused me, but we're not here to teach HTML, especially if we can neatly recover from messes.
We could have it send a tsk-tsk note to the poster's profile email. ;)
Hee. God bless negative reinforcement.
Thanks, ita. I'm on it. Wrist-slap comments in the code shouldn't be much of a problem, actually. I can just dump this [link] output inside a comment block.
There has to be some point, though, where the input is sufficiently mangled that tidy can't deal with it, right?
If the mangling is unclosed (or unopened) tags, I think that at the very least tidy can protect the rest of the board from destruction, although the post itself may be an illegible wasteland.
And that's what I think is key -- it's the poster's job to make it look like they want. It's our job to protect the innocent bystanding posts.
Haven't thrown anything like t a href='http://buffistas.org" at it yet, though. Don't know what it does.
I don't expect perfection, never did. The difference between tidy doing the tidying and us is the whole "Hasn't someone already invented one of those round things?" issue. They've probably put way more time and diligence into it that we have to spare.