Bug 842198 - [WebTrans] False validation warning on XML numeric entity reference with a leading space.
Summary: [WebTrans] False validation warning on XML numeric entity reference with a le...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-UI
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 1.7.2
Assignee: Alex Eng
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-23 02:48 UTC by Ding-Yi Chen
Modified: 2012-11-29 23:29 UTC (History)
2 users (show)

Fixed In Version: 1.7.2-SNAPSHOT (20120809-0001)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-29 23:29:37 UTC
Embargoed:


Attachments (Terms of Use)

Description Ding-Yi Chen 2012-07-23 02:48:34 UTC
Description of problem:
The webtrans gives falae warning on an XML numeric entity (ϧ) if it has a space in the front.

For example, webtrans show warning on 
"Web "" but not 
"Web&#34"

Version-Release number of selected component (if applicable):
Zanata version 1.7.0-alpha-2-SNAPSHOT (20120723-0951)

How reproducible:
Alwways

Steps to Reproduce:
1. Visit a document.
2. Type "Web "" in any empyy entry.
  
Actual results:
Validation Warning: XML entity [ " ] is incomplete

Expected results:
No Validation Warning:

Additional info:
XML character entity reference (such as  ) does not seem to trigger the validation warning.

Comment 1 Runa Bhattacharjee 2012-07-30 12:01:40 UTC
Assigning to Zanata Dev Team for evaluation

Comment 3 Sean Flanigan 2012-07-31 02:58:55 UTC
I think this is the sort of thing we need to fix in 1.7.x.

Comment 4 Alex Eng 2012-07-31 03:10:52 UTC
Fix backported to 1.7.2.

Comment 5 Ding-Yi Chen 2012-08-06 01:52:46 UTC
Tested with 1.8.0-SNAPSHOT (20120806-0025) and 1.7.2-SNAPSHOT (20120806-0012)

The "Web "" no longer gives false warning, however, they failed to give warning in following cases:

&#YKK; &#BBRR;

In other words, xml numeric entities that are neither decimal nor hexadecimal should produce warning like "invalid xml numeric entity".

http://en.wikipedia.org/wiki/Numeric_character_reference 
shows the valid format and restrictios.


Reassigned.

Comment 6 Alex Eng 2012-08-06 04:14:55 UTC
Implemented numeric xml entity validation.

See https://github.com/zanata/zanata/commit/7eb7e4793d8c1d5fefc5c5e545c5c45e2c363e74

Comment 7 Ding-Yi Chen 2012-08-09 01:33:46 UTC
VERIFIED with 1.8.0-SNAPSHOT (20120809-0024) 
and 1.7.2-SNAPSHOT (20120809-0001)


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