Bug 814393 - Skynet inserts errant whitespace in emphasis, acronym, systemitem, package, and keycap tags.
Summary: Skynet inserts errant whitespace in emphasis, acronym, systemitem, package, a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: PressGang CCMS
Classification: Community
Component: Web-UI
Version: 1.x
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Lee Newson
QA Contact:
URL:
Whiteboard:
: 808989 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-19 18:49 UTC by Stephen Gordon
Modified: 2014-05-27 01:30 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-16 06:14:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Stephen Gordon 2012-04-19 18:49:35 UTC
Description of problem:

When re-visiting some edits to topic 7868 I found that this (as originally entered):

		<para>
			For every type of switch it is important to set up the switch bonding with the <firstterm>Link Aggregation Control Protocol</firstterm> (<acronym>LACP</acronym>) protocol and <emphasis>not</emphasis> the Cisco <firstterm>Port Aggregation Protocol</firstterm> (<acronym>PAgP</acronym>) protocol. 
		</para>

Had become this (as modified by the system when the topic is saved):

		<para>
			For every type of switch it is important to set up the switch bonding with the <firstterm>Link Aggregation Control Protocol</firstterm> (
			<acronym>
				LACP
			</acronym>) protocol and 
			<emphasis>
				not
			</emphasis> the Cisco <firstterm>Port Aggregation Protocol</firstterm> (
			<acronym>
				PAgP
			</acronym>) protocol. 
		</para>

I anticipate that when rendered this will mean that there is (unexpectedly) additional whitespace around the acronyms and the emphasised 'not'.

Expected behaviour:

These tags to be handled in the same way as the <firstterm> in the example, no additional whitespace injected. Possibly impacts other tags too but these are just the ones I have come across.

Comment 1 Stephen Gordon 2012-06-25 15:39:58 UTC
I've found that systemitem, package and keycap tags have the same issue - probably others. I'm raising the priority on this because:

a) It's noticeable in the English output, and even if we edit the topic to remove the whitespace in skynet when the topic is saved it is re-inserted.

b) It impacts translation matching, and adds some additional work for translators (because they can actually remove the errant whitespace in translated versions).

Comment 3 Stephen Gordon 2012-06-25 15:51:00 UTC
Looks like editing out the whitespace around the <acronym> tags actually does save, not so for the others though.

Comment 4 Lee Newson 2012-06-27 04:27:46 UTC
Sorry Steve, I completely missed this bug. I'll update the system variables that control the inline elements at COB in BNE today, unfortunately we don't have a way to update them at this point in time so that means manually going back and editing the content. I'll discuss that component with Matt once he gets back.

Comment 5 Lee Newson 2012-06-27 04:32:53 UTC
Just as reference we have this bug open for the white space Bug #812716

and these are the current inline variables as of 27th of June (before editing):

code,prompt,command,firstterm,ulink,guilabel,filename,replaceable,parameter,literal,classname,sgmltag,guibutton,guimenuitem,guimenu,menuchoice,citetitle,application,systemitem,acronym,keycap

So package and emphasis are the only two that I can see to be missing. If you know of any others that are missing please let us know.

Comment 6 Lee Newson 2012-06-27 05:07:44 UTC
Added more inline elements that I found from: http://www.docbook.org/tdg5/en/html/ch02.html

New Elements:

quote,trademark,abbrev,phrase,anchor,citation,glossterm,link,xref,markup,tag,
keycode,keycombo,accel,guisubmenu,keysym,shortcut,mousebutton,constant,errorcode,
errorname,errortype,function,msgtext,property,returnvalue,symbol,token,varname,
database,email,hardware,option,optional,type

Comment 7 Lee Newson 2012-06-27 06:37:35 UTC
Missed one:

methodname

Comment 9 Lee Newson 2012-06-27 11:46:32 UTC
One more that I found when looking through different topics:

interfacename

Comment 10 Matthew Casperson 2012-07-01 21:38:18 UTC
We could simply run through a bulk re-save of topics, which will change the formatting of the topics. However this does have implications on the translations as any changes to the original topic could potentially force a retranslation.

However, I don't think there are any topics in Zanata for anyone other than EAP6 and maybe EDG, so this may not be such a large issue.

Comment 11 Lee Newson 2012-07-01 22:34:31 UTC
The other issue with a bulk re-save is that the white space would still exist it would just make it easy to see where the white space is.

eg

Original:

    Some Text <systemitem>Some more Text</systemitem>

Bugged:

    Some Text
    <systemitem>SPACE
        Some more TextSPACE
    </systemitem>

Re-Save:

    Some Text <systemitem> Some more Text </systemitem>

Comment 12 Stephen Gordon 2012-07-04 19:30:33 UTC
Seems like the <uri> tag is also impacted.

Comment 13 Lee Newson 2012-07-05 12:40:07 UTC
Confirmed and added to the list of inline elements.

Comment 14 Matthew Casperson 2012-07-10 03:41:04 UTC
*** Bug 808989 has been marked as a duplicate of this bug. ***

Comment 15 Stephen Gordon 2012-10-11 16:16:53 UTC
<computeroutput> as well. As per the docbook guide this is an inline:

http://www.docbook.org/tdg/en/html/computeroutput.html

Comment 16 Lee Newson 2012-10-11 22:45:28 UTC
Added computeroutput to the list of inline elements.

Comment 17 Misty Stanley-Jones 2013-05-29 02:19:22 UTC
This hasn't been touched in a while, which implies that we haven't found more. Am I correct that this issue is actually fixed for all known impacted elements?

Comment 18 Lee Newson 2013-08-16 06:14:45 UTC
Closing this since we haven't found anymore known elements.


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