Created
June 16, 2010 20:41
-
-
Save jbr/441238 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From b3927509174147bc7fc042e6b900be877c226a41 Mon Sep 17 00:00:00 2001 | |
From: Jacob Rothstein <[email protected]> | |
Date: Wed, 16 Jun 2010 13:40:27 -0700 | |
Subject: [PATCH] splat out ESCAPE_HTML.keys for older rubies | |
--- | |
lib/rack/utils.rb | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/lib/rack/utils.rb b/lib/rack/utils.rb | |
index 45c1517..bc60cd1 100644 | |
--- a/lib/rack/utils.rb | |
+++ b/lib/rack/utils.rb | |
@@ -135,7 +135,7 @@ module Rack | |
"'" => "'", | |
'"' => """, | |
} | |
- ESCAPE_HTML_PATTERN = Regexp.union(ESCAPE_HTML.keys) | |
+ ESCAPE_HTML_PATTERN = Regexp.union(*ESCAPE_HTML.keys) | |
# Escape ampersands, brackets and quotes to their HTML/XML entities. | |
def escape_html(string) | |
-- | |
1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment