Current location: Hot Scripts Forums » General Community » Script Requests » PHP script to parse HTML


PHP script to parse HTML

Reply
  #1 (permalink)  
Old 10-05-03, 03:26 AM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation PHP script to parse HTML

Hi,
I need a script to parse strings containing HTML.
I want to be able to allow certain tags with specified attributes only, and remove any dissallowed tags, or tags with dissallowed attributes.

So far all I have found is a script that can allow all attributes or no attributes, and a specific set of tags, but I need to be able to control attibutes individually.
Reply With Quote
  #2 (permalink)  
Old 10-05-03, 08:41 AM
jewellgr jewellgr is offline
Wannabe Coder
 
Join Date: Aug 2003
Location: Michigan USA
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
I can make a script where you list the tags in a file and the php would strip whatever tags are in that file.

Just email me with details at greggjewell@yahoo.com. It should only take 10-15 minutes to make.
__________________
ArecaWeb Team
Gregg Kenneth Jewell
Reply With Quote
  #3 (permalink)  
Old 10-05-03, 08:41 PM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
I can make a script where you list the tags in a file and the php would strip whatever tags are in that file.
It actually gets even trockier than I mentioned, I'd like to allow certain tags, with certain attributes, but also restrict the values for the attributes.

Example:
I could allow just <font face="arial"> or I could allow <font face="arial" size="4">, but dissallow <font face="arial" size="6">

(The eventual aim is to allow the restricted use of filters in IE5 and above.. ie. I could allow glowing text up to a certain size, but stop other filters)

If this is too complicated, the ability to allow or dissallow individual attributes will be fine..
(then anything else is weeded out, including invalid HTML tags, like <font</font> where the closing '>' is missing)

BTW, I can only offer you credit in the documentation and script, I can't offer any cash sorry.. (as the script itself will be freeware)

Last edited by Skeleton Man; 10-05-03 at 08:44 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP theme selection script TMD PHP 2 09-22-03 03:43 AM
PHP script required Mickey Job Offers & Assistance 8 09-07-03 03:00 PM
Script for picking the first HTML file out of a directory (with sorted HTML files) jelteveld Script Requests 0 08-16-03 01:30 PM
I need help with my first php script NeverMind PHP 4 08-01-03 01:27 PM
30% off Hosting - Free PHP Script Autoinstaller cyberwisdom General Advertisements 0 07-06-03 01:47 PM


All times are GMT -5. The time now is 11:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.