2

I'm wondering if anybody has used this class and found it to be reliable?

http://www.phpclasses.org/package/3746-PHP-Remove-unsafe-tags-and-attributes-from-HTML-code.html

Many thanks!

1

2 Answers 2

12

i recommend http://htmlpurifier.org/ HTML Purifier for cleaning strings safely.

Sign up to request clarification or add additional context in comments.

2 Comments

Ah, this is useful. One for the future. Many thanks! Does anyone have any comments on the original class I posted?
i can also recommend cakephp's sanitize class book.cakephp.org/view/321/Data-Sanitation-The-Sanitize-Class it can easily be forked.
-5

I'm wondering if anybody has used this class and found it to be reliable?

erm....

1) phpclasses invites feedback from users - if there's no feedback there, why do you think you'd find it here?

2) its a fairly generic bit of code - the value is in how you apply it, you don't state what your objectives are nor what you've compared it with,

3) certainly the code looks to be competently written and allows a much finer level of control than striptags() but as in 2 we can't say what value that is to you without any information about what you are trying to achieve.

C.

3 Comments

As much as i kinda agree with the points you have made, i can't help by think they are predominantly unnecessary as one can almost make an "educated guess" on what the user is attempting to achieve, and being helpful rather than wasting time on patronising could be more beneficial...?
Yes, I echo Shadi. A bit of a patronising response. But I'm in a forgiving mood :) Thanks for the response nonetheless.
@symcbean The place for patronizing is in a comment on the question, not in an "answer".

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.