diff --git a/lib/sablon/document_object_model/relationships.rb b/lib/sablon/document_object_model/relationships.rb index 87e53dbc..54e9eea7 100644 --- a/lib/sablon/document_object_model/relationships.rb +++ b/lib/sablon/document_object_model/relationships.rb @@ -104,7 +104,7 @@ def next_rid # Builds the relationship WordML tag and returns it def relationship_tag(rel_attr) attr_str = rel_attr.map { |k, v| %(#{k}="#{v}") }.join(' ') - "" + "".gsub(/&(?!amp;)/, '&') end end end diff --git a/test/fixtures/html_sample.docx b/test/fixtures/html_sample.docx index 8e045cc0..d79af65c 100644 Binary files a/test/fixtures/html_sample.docx and b/test/fixtures/html_sample.docx differ diff --git a/test/fixtures/insertion_template.docx b/test/fixtures/insertion_template.docx index 874f8918..75fcb28a 100644 Binary files a/test/fixtures/insertion_template.docx and b/test/fixtures/insertion_template.docx differ diff --git a/test/html_test.rb b/test/html_test.rb index 6b0fdbff..36f693b0 100644 --- a/test/html_test.rb +++ b/test/html_test.rb @@ -20,7 +20,8 @@ def test_generate_document_from_template_with_styles_and_html 'html:content' => content, inline_content: { 'html:should' => 'should', - 'html:github' => 'GitHub' + 'html:github' => 'GitHub', + 'html:google' => 'Google' } } template.render_to_file output_path, context