Bug 1095022

Summary: Entities in fields like Copyright Holder are not processed correctly
Product: [Community] PressGang CCMS Reporter: Matthew Casperson <mcaspers>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.5CC: cbredesen, lnewson
Target Milestone: ---   
Target Release: 1.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-28 21:56:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Casperson 2014-05-07 01:30:26 UTC
Add the following field to a spec:

Copyright Holder = Red&nbsp;Hat, Inc

When the book is built, you'll get this

Copyright © 2014 Red&nbsp;Hat, Inc.

We should get this

Copyright © 2014 Red Hat, Inc.

Comment 1 Lee Newson 2014-05-07 01:38:12 UTC
*** Bug 1064707 has been marked as a duplicate of this bug. ***

Comment 2 Lee Newson 2014-05-13 07:48:26 UTC
Fixed in 1.6-SNAPSHOT build 201405131741

This was caused by escaping all "&" characters as "&amp;". This meant the value in the entity file was "Red&amp;nbsp;Hat, Inc". This has now been updated to remove entities first and then do the replacement.

Comment 4 Matthew Casperson 2014-05-22 03:36:38 UTC
When using built in entities (like &nbsp; or &gt;) or entities defined in the Entities metadata field in the Copyright Holder metadata field, everything works as expected.

When using entities that don't exist (e.g. Copyright Holder = &NON_EXISTANT;), csprocessor will build the book ok, but Publican won't compile it. 

An error should be generated when the spec is saved for malformed metadata elements.

Comment 5 Lee Newson 2014-05-22 06:03:32 UTC
That's a separate bug and applies to more than Copyright Holder, as such I've opened BZ#1100139 to handle that. Moving this back to ON_QA since that isn't related to this bug, as this is about making sure entities in copyright holder aren't escaped when built.

Comment 6 Matthew Casperson 2014-05-22 22:45:07 UTC
Added entities to Title, Subtitle, Product, Abstract and Copyright Holder. All built ok.