Bug 1017475 - Spaces at the end of text within <phrase> tag removed on save
Summary: Spaces at the end of text within <phrase> tag removed on save
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 1.3
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 01:24 UTC by mmurray
Modified: 2013-12-03 22:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-03 22:16:30 UTC


Attachments (Terms of Use)

Description mmurray 2013-10-10 01:24:35 UTC
Description of problem:
Spaces at the end of text within <phrase> tag is removed on save. 


For example, topic [22602]:
	<para>
		A universal installer <filename>.jar</filename> file is provided for installing JBoss&nbsp;Developer&nbsp;Studio and it is available from the Customer Portal. <phrase condition="install">A second version of the universal installer for installing both JBoss&nbsp;Developer&nbsp;Studio and JBoss EAP is also available from the Customer Portal.</phrase>The procedure below guides you though obtaining the universal installer<phrase condition="install">s</phrase> and the installation process.
	</para>

I want a space between 'Portal.' and '</phrase>' (near end of para)
Added spaces are removed by UI on save.

Am sure I can work around this but is removing spaces on save really necessary? If spaces are intentional and removing goes unnoticed by writer then this introduces bugs in docs.

Version-Release number of selected component (if applicable):
Build 201309081012

Comment 1 mmurray 2013-10-10 01:28:26 UTC
Actually don't think I can get around issue. I added a space at start of phrase (so '<phrase> ') but space was removed on save.

<phrase> needs a space at start or end when it comes in between other sentences and conditions are used. So this is a bug that needs fixing.

Comment 2 Lee Newson 2013-10-10 01:41:57 UTC
Verifying that this is a bug and re-assigning to the correct component.

As for working around it, the only way I can think to do that would be to use "Customer Portal.&nbsp;</phrase>The", although that would insert a non-breaking space. "&puncsp;" might work, but that doesn't exactly translate to a normal space either.

Comment 3 Lee Newson 2013-11-07 00:26:33 UTC
Fixed in 1.3-SNAPSHOT build 201311071008

The convertNodeToString() method used to do the formatting wasn't taking inline elements into account when stripping/cleaning the whitespace from the start/end of the nodes. This meant that if you had something like Michelle mentioned above that the XML would be altered when it shouldn't have been.

Comment 6 Matthew Casperson 2013-11-25 21:15:24 UTC
I tried a couple of inline elements with spaces at the start and end of the element, and single spaces were preserved. Multiple spaces were condensed to a single space, but this is valid because I believe multiple spaces are ignored anyway.


Note You need to log in before you can comment on or make changes to this bug.