diff options
Diffstat (limited to 'config')
| -rw-r--r-- | config/initializers/xmlparser.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/initializers/xmlparser.rb b/config/initializers/xmlparser.rb index 9c3f1c8..1d5e06d 100644 --- a/config/initializers/xmlparser.rb +++ b/config/initializers/xmlparser.rb | |||
| @@ -1,14 +1,19 @@ | |||
| 1 | class XML::Node | 1 | class XML::Node |
| 2 | def replace_with(other) | 2 | def replace_with(other) |
| 3 | self.next = other | 3 | self.next = other |
| 4 | remove! | 4 | remove! |
| 5 | end | 5 | end |
| 6 | end | 6 | end |
| 7 | 7 | ||
| 8 | # Builder 3.x escapes content by default. Override _escape to pass text | ||
| 9 | # through raw, preserving existing behaviour from the Rails 2 era. | ||
| 10 | # Note: require builder first to ensure XmlBase < BasicObject is already | ||
| 11 | # defined before we reopen it. | ||
| 12 | require 'builder' | ||
| 8 | module Builder | 13 | module Builder |
| 9 | class XmlBase | 14 | class XmlBase |
| 10 | def _escape(text) | 15 | def _escape(text) |
| 11 | text | 16 | text |
| 12 | end | 17 | end |
| 13 | end | 18 | end |
| 14 | end \ No newline at end of file | 19 | end |
