Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bumping version to 0.1.2 to include whitewashing functionality

  • Loading branch information...
commit 0bdfb2846e87b228d2e8a70309b15c8404315c67 1 parent cc48a05
Mike Dalessio authored April 30, 2009
13  README.markdown
Source Rendered
@@ -24,7 +24,7 @@ Yeah, it's that easy.
24 24
 In this example, <tt>safe\_html\_snippet</tt> will have all of its __broken markup fixed__ by libxml2, and it will also be completely __sanitized of harmful tags and attributes__. That's twice as clean!
25 25
 
26 26
 
27  
-More Usage
  27
+Sanitization Usage
28 28
 -----
29 29
 
30 30
 You're still here? Ok, let me tell you a little something about the two different methods of sanitizing the Dryopteris offers.
@@ -51,9 +51,12 @@ The returned string will contain exactly one (1) well-formed HTML document, with
51 51
 
52 52
 Coolness: <tt>dangerous\_html\_document</tt> can be a string OR an IO object (a file, or a socket, or ...). Which makes it particularly easy to sanitize large numbers of docs.
53 53
 
54  
-### Whitewashing HTML
  54
+Whitewashing Usage
  55
+-----
  56
+
  57
+### Whitewashing Fragments
55 58
 
56  
-Other times, you may want to allow a user to submit HTML, and remove all styling, attributes and invalid HTML tags. I like to call this "whitewashing", since it's putting a new layer of paint on top of the user's HTML input to make it look nice.
  59
+Other times, you may want to remove all styling, attributes and invalid HTML tags. I like to call this "whitewashing", since it's putting a new layer of paint on top of the HTML input to make it look nice.
57 60
 
58 61
 One use case for this feature is to clean up HTML that was cut-and-pasted from Microsoft(tm) Word into a WYSIWYG editor/textarea. Microsoft's editor is famous for injecting all kinds of cruft into its HTML output. Who needs that? Certainly not me.
59 62
 
@@ -65,6 +68,10 @@ Please note that whitewashing implicitly also sanitizes your HTML, as it uses th
65 68
  2. if the tag has an XML namespace on it, remove it from the document
66 69
  2. remove all attributes from the node
67 70
 
  71
+### Whitewashing Documents
  72
+
  73
+Also note the existence of <tt>whitewash\_document</tt>, which is analogous to <tt>sanitize\_document</tt>.
  74
+
68 75
 Standing on the Shoulders of Giants
69 76
 -----
70 77
 
2  dryopteris.gemspec
@@ -2,7 +2,7 @@
2 2
 
3 3
 Gem::Specification.new do |s|
4 4
   s.name = %q{dryopteris}
5  
-  s.version = "0.1.1"
  5
+  s.version = "0.1.2"
6 6
 
7 7
   s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8 8
   s.authors = ["Bryan Helmkamp", "Mike Dalessio"]

0 notes on commit 0bdfb28

Please sign in to comment.
Something went wrong with that request. Please try again.