File: replaces_gt_symbol_by_enconded_version.patch

package info (click to toggle)
ruby-xmlparser 0.7.3-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 896 kB
  • ctags: 1,874
  • sloc: ruby: 9,323; ansic: 2,016; makefile: 11
file content (24 lines) | stat: -rw-r--r-- 610 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- a/lib/xml/dom/core.rb
+++ b/lib/xml/dom/core.rb
@@ -1846,6 +1846,8 @@ return the string representation of the
             value << "&quot;"
           when ?<
             value << "&lt;"
+	  when ?>
+	    value << "&gt;"
           else
             value << code
           end
--- a/lib/xml/dom2/attr.rb
+++ b/lib/xml/dom2/attr.rb
@@ -122,7 +122,9 @@ return the string representation of the
             value << "&quot;"
           elsif c == "<"
             value << "&lt;"
-          else
+          elsif c == ">"
+	    value << "&gt;"
+	  else
             value << c
           end
         end