alexmadsen Posted January 21, 2007 Share Posted January 21, 2007 HI , whenever my site users posted a text(html base without strip tags) , if html post contain a closed tags and incomplete tags ; mixed my site main html . example : posted : 11111</TR><TR><DIV id=postbody><P> </P><P>2222<BR>3333 </TR><TR><IMG src="http://www.blogsky.com/editor/images/smiles/05.gif"> <BR>44444<BR>- <IMG src="http://www.blogsky.com/editor/images/smiles/04.gif"> <IMG src="http://www.blogsky.com/editor/images/smiles/04.gif"><BR>-55555<BR>- 666666666666666666<IMG src="http://www.blogsky.com/editor/images/smiles/20.gif">&nbs;pgsdg<BR>- 77777777777<IMG src="http://www.blogsky.com/editor/images/smiles/26.gif"> ... sdgsdsdg <IMG src="http://www.blogsky.com/editor/images/smiles/22.gif"><BR>- 88888888888888 <IMG src="http://www.blogsky.com/editor/images/smiles/14.gif"></P></DIV>********corrected with gmail editor : 11111<table><tr> <td><div><p> </p><p>2222<br>3333 </p></div></td></tr><tr><td><img> <br>44444<br>- <img> <img><br>-55555<br>- 666666666666666666<img>&nbs;pgsdg<br>- 77777777777<img> ... sdgsdsdg <img><br>- 88888888888888 <img></td></tr></table></div>************************************how I can correct posted html to a html that is safe to my main html similar gmail? with php or javascript ?please help me ? Link to comment https://forums.phpfreaks.com/topic/35066-how-i-can-correct-posted-html-to-a-html-that-is-safe/ Share on other sites More sharing options...
webren Posted January 21, 2007 Share Posted January 21, 2007 Are you talking about making your own HTML parser? Link to comment https://forums.phpfreaks.com/topic/35066-how-i-can-correct-posted-html-to-a-html-that-is-safe/#findComment-165496 Share on other sites More sharing options...
alexmadsen Posted January 21, 2007 Author Share Posted January 21, 2007 [quote author=webren link=topic=123340.msg509659#msg509659 date=1169367136]Are you talking about making your own HTML parser?[/quote]I apologize that I cant speak english very well . I want build a html that is contain my html code and users posted html . whenever users post a text(html base without strip tags) , if html post contain a closed tags and incomplete tags ; mixed my site main html .how I can correct posted html to a html that is safe to my main html similar gmail? with php or javascript ?please help me ? Link to comment https://forums.phpfreaks.com/topic/35066-how-i-can-correct-posted-html-to-a-html-that-is-safe/#findComment-165500 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.