[PHP] Outputting Valid HTML

vern

Dominus
Political Access
Joined
2 Mar 2002
Messages
1,572
Is there a script or function out there that checks and replaces what would otherwise be just plain and possibly not valid HTML into valid HTML?
 
easily? no since valid html would depend on which standard you used.

You could make some nice regular expression checks to make sure each tag has a closing tag and such
 
You'd need to include the entire HTML (or XHTML) specification that you're going to be using in a rather large PHP class and check the code for anything which doesn't follow the rules.

It'd be a rather large job, and I've never come across a script which does it. I'd just stick with the w3 Validator and their HTML Tidy application. Both can be found on http://w3.org/ if I recall.
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back