php-germ

PHP-Klasse::HTML Sanitizer 06.03.2007

abgelegt im Archiv PHP-Classes-News am 07.03.07

PHP-Klasse::HTML Sanitizer 06.03.2007

Kurzbeschreibung: Remove unsafe tags and attributes from HTML code


Veröffentlicht am: 06.03.2007


Gruppe(n):


  • HTML

  • Security

Beschreibung:

This class can be used to remove unsafe tags and attributes from HTML code.

It takes a string with HTML code and strips all the tags that do not make part of a list of safe tags. That list of safe tags is defined as a private class variable. There are some functions to allow usually unsafe tags like script, style, object, embed, etc..

The class can also remove unsafe tag attributes, such as those that define Javascript code to handle events.

The links href attributes also gets special treatment to remove URLs that trigger Javascript code execution and line breaks.

Link: HTML Sanitizer





Permalink: PHP-Klasse::HTML Sanitizer 06.03.2007

Tags: PHP  HTML  Security  OOP  JavaScript  Style  Object 

Stimmen Sie ab für PHP-Klasse::HTML Sanitizer 06.03.2007:

  • Currently 9.00/10
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
Dieser Eintrag wurde mit: 9.00 Punkten (von 1 Stimme(n) insg.) bewertet.
 
Share It
Most Popular   Angesurft   Best of   CEBIT 2007   CMS-Systeme   CSS   Dies und Das und Sowieso   Events   Hardware   IT-Aktuell   JavaScript   Kurios & Interessant   Kurz vorgestellt   Linux   Misc   News   PHP-Classes-News   PHP-News   PHP-PEAR-News   Provider & Webhosting   Schon gewusst  
blog-o-rama.de bloggerei.de - deutsches Blogverzeichnis Deutsches Blog Verzeichnis