Skip to content

Commit 9c14c69

Browse files
committed
#315. Forgot to add this
1 parent e744cef commit 9c14c69

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

lib/xml_security.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def canon_algorithm(element)
5050
case algorithm
5151
when "http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
5252
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments" then Nokogiri::XML::XML_C14N_1_0
53-
when "http://www.w3.org/2006/12/xml-c14n11" then Nokogiri::XML::XML_C14N_1_1
53+
when "http://www.w3.org/2006/12/xml-c14n11",
54+
"http://www.w3.org/2006/12/xml-c14n11#WithComments" then Nokogiri::XML::XML_C14N_1_1
5455
else Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0
5556
end
5657
end

test/xml_security_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class XmlSecurityTest < Minitest::Test
102102
it "XML_C14N_1_1" do
103103
canon_algorithm = Nokogiri::XML::XML_C14N_1_1
104104
assert_equal canon_algorithm, XMLSecurity::BaseDocument.new.canon_algorithm("http://www.w3.org/2006/12/xml-c14n11")
105+
assert_equal canon_algorithm, XMLSecurity::BaseDocument.new.canon_algorithm("http://www.w3.org/2006/12/xml-c14n11#WithComments")
105106
end
106107
end
107108

0 commit comments

Comments
 (0)