GithubHelp home page GithubHelp logo

smartnetguru / htmlawed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gerhobbelt/htmlawed

0.0 2.0 0.0 483 KB

a highly customizable PHP script to sanitize / make (X)HTML secure against XSS attacks, so users can edit HTML without risk of your site getting compromised by evildoers.

Home Page: http://www.bioinformatics.org/phplabware/internal_utilities/htmLawed/

License: GNU General Public License v2.0

ApacheConf 0.02% PHP 33.24% HTML 66.73%

htmlawed's Introduction

HTMLawed is ...

... a single-file, 45 kb PHP script that makes input text more secure, HTML standards-compliant, and suitable in general from the viewpoint of a web-page administrator, for use in the body of HTML, XHTML or XML documents. A simple HTMLTidy alternative, the htmLawed filter, processor, purifier, sanitizer, beautifier, etc., is highly customizable.

It ensures that HTML tags are balanced and properly nested tags, neutralizes code that may be used for cross-site scripting (XSS) attacks, limits allowed HTML elements, attributes, or URL protocols, tidies the code, and so forth.

As such it may serve as an alternative to HTMLtidy in a sanitation context.

This repository is ...

... a derivative, which closely tracks the original and may contain some additional tweaks and tugs for performance and/or filtering ability reasons.

Current extra features compared to the original:

  • UTF-8 throughout: all HTML entity conversions are now performed in UTF-8 (instead of an arbitrary codepage; of course this assumes you'll feed the bugger UTF-8 (or what should be treated as UTF-8 at least), as does its own test page.
  • the test page accepts up to 10x larger inputs than the original test page (so you can run a test on large chunks of copy through the form)

Links

htmlawed's People

Contributors

gerhobbelt avatar gerardhundman avatar

Watchers

James Cloos avatar Smart Segun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.