diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-27 22:52:50 +0200 |
| commit | 9a19a0494ef51cdac9a78e24d517ca48ba44c453 (patch) | |
| tree | 8eaae12d8047a40e29d3ea7ff3116b5c869e04bd /config/initializers/xmlparser.rb | |
| parent | 85a01e35274b8d4d4165a7b26bd7986e211246bb (diff) | |
| parent | 1853082fcd8c067390c246f9daa01a9b47387497 (diff) | |
Migration from Rails 2.3.5 to Rails 8.1 successful.
Merging dev branch.
Diffstat (limited to 'config/initializers/xmlparser.rb')
| -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 |
