Re: Check for well formed html
| From: | tedd | Date: | Tue, 07 Aug 2007 02:27:14 +0000 |
| Subject: | Re: Check for well formed html | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260261@lists.php.net to get a copy of this message | ||
At 5:14 PM +0200 8/5/07, Tijnema wrote:
On 8/5/07, tedd <tedd@sperling.com> wrote:Tijnema: Thanks, that was interesting. See: http://www.webbytedd.com/b/match-tags/ The code will find and pull out matched tags, but it produces odd results if it finds a malformed tag (i.e., b/> ). Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comHi gang: I have a client who wants to include html tags in his CMS. I know that I can limit what tags he can use, but how can I check if the text is well formed with the tags permitted before storing it in his CMS? Cheers, teddHave a look at Example 1687 on the manual page for preg_match_all, I think you can use it with a little modification :) Tijnema