Fix unexpected changes in HTML attachment slugs #2357
HTML publication slugs change unexpectedly given the following scenario:
Because the slug comes from an extended class it is not included when running
HTML publication slugs change unexpectedly given the following scenario: * Create a new edition of a published document and alter the HTML attachment title * Publish the document, at this point the HTML attachment slug is still correct * Create another new edition, when this edition is created the attachment slug changes to one based on the edited title. This test demonstrates that bug.
Because the slug comes from an extended class it is not included when running `dup`. Whenever a new edition with an HTML attachment was created the slug was regenerated based on the title. If the attachment title changed then subsequent editions would have different slugs. Explicitly copy the slug to the new attachment so a new one isn't generated. "When using dup, any modules that the object has been extended with will not be copied." http://ruby-doc.org/core-2.1.6/Object.html#method-i-dup