You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In def self.merge_documents, when attaching a new Relationship node (new_rel_node = "<Relationship Id=#{new_id} Type=#{node["Type"]} Target=#{target_val} />"), Nokogiri will attempt to fix the XML and in the process lowercase all of the attributes, resulting in a corrupt word/_rels/document.xml.rels (e.g. <relationship id="rId101" type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" target="media/image101.png"/>).
Proposed solution would be to either properly escape new_rel_node, e.g. new_rel_node = "<Relationship Id=\"#{new_id}\" Type=\"#{node["Type"]}\" Target=\"#{target_val}\" />", or to use Nokogiri::XML::Node.new to properly create the node
The text was updated successfully, but these errors were encountered:
In
def self.merge_documents
, when attaching a new Relationship node (new_rel_node = "<Relationship Id=#{new_id} Type=#{node["Type"]} Target=#{target_val} />"
), Nokogiri will attempt to fix the XML and in the process lowercase all of the attributes, resulting in a corruptword/_rels/document.xml.rels
(e.g.<relationship id="rId101" type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" target="media/image101.png"/>
).Proposed solution would be to either properly escape
new_rel_node
, e.g.new_rel_node = "<Relationship Id=\"#{new_id}\" Type=\"#{node["Type"]}\" Target=\"#{target_val}\" />"
, or to useNokogiri::XML::Node.new
to properly create the nodeThe text was updated successfully, but these errors were encountered: