473,379 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

PHP HTML Scrubber?

I'm looking for a php HTML scrubber similar to the PERL HTML::Scrubber
(http://search.cpan.org/~podmaster/HT...8/Scrubber.pm). I need it
to sanitize comments submitted to a web log.

Is there such a thing?
Jun 22 '06 #1
4 2871

deko schreef:
I'm looking for a php HTML scrubber similar to the PERL HTML::Scrubber


http://pear.php.net/package/HTML_Safe

Jun 22 '06 #2
>> I'm looking for a php HTML scrubber similar to the PERL HTML::Scrubber

http://pear.php.net/package/HTML_Safe


This looks interesting, but...

How do I verify if my host's server has HTMLSax3 installed?

Is HTMLSax3 a script I can install in my user directory if my host does not have
it installed?

How do I pass the string I want checked to the Safe.php script?

Thanks

Jun 22 '06 #3
>>> I'm looking for a php HTML scrubber similar to the PERL HTML::Scrubber

http://pear.php.net/package/HTML_Safe


This looks interesting, but...

How do I verify if my host's server has HTMLSax3 installed?

Is HTMLSax3 a script I can install in my user directory if my host does not
have it installed?

How do I pass the string I want checked to the Safe.php script?


I downloaded the scripts from http://www.pixel-apes.com/safehtml - which
includes HTMLSax3 as well as Decorators.php and States.php.

I was able to get the demo working, but I need to do something like this (in a
script, not in the page):
....
$content = trim($_POST['comment']);
require_once('/home/username/public_html/cgi-bin/HTML_Safe/safehtml.php');
$content = ??? //how do I invoke safehtml.php against this string variable?
.... more processing ...

Jun 22 '06 #4
On Wed, 21 Jun 2006 22:31:07 -0700, deko wrote:
I'm looking for a php HTML scrubber similar to the PERL HTML::Scrubber
(http://search.cpan.org/~podmaster/HT...8/Scrubber.pm). I need it
to sanitize comments submitted to a web log.

Is there such a thing?


http://au2.php.net/strip_tags

It's probably not as functional as HTML::Scrubber, but if you're basically
just wanting to strip HTML out, it'll get the job done.

Adam

--
Adam Harvey

To e-mail: don't make an example out of me!

Jun 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
20
by: Al Moritz | last post by:
Hi all, I was always told that the conversion of Word files to HTML as done by Word itself sucks - you get a lot of unnecessary code that can influence the design on web browsers other than...
6
by: Ludwig77 | last post by:
When I was first taught html several years ago, I was taught that the following tags are standard for any html formatted message: <HTML> <HEAD> </HEAD> </BODY> </HTML> In fact, I was taught...
0
by: Geoff | last post by:
I am looking for a Win 2003 version of the Microsoft Storage Device Registry Cleaner Scrubber Tool. I have the one for Windows 2000 but need one that works for 2003. This is to clean the registry...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.