IgniteUI / ignite-ui

Ignite UI for jQuery by Infragistics
https://bit.ly/2kuu1fT
Other
477 stars 83 forks source link

< cannot be used in node attribute #2033

Closed ymita closed 4 years ago

ymita commented 4 years ago

Description

< cannot be used in node attribute. If < is supplied, the node tag is generated in an invalid form.

Steps to reproduce

  1. Open the attached sample
  2. Observe the tree
  3. Inspect the top level node which contains < Line 41 var xmlDoc = '<OrgChart Name="&lt;All employees">' +

Result

The top level node is not visible. And the generated tag is <all employees<="" a=""></all>. image

Expected result

The top level node is rendered correctly and is visible. And the generated tag should be something like <a href="#" target="_self" class="ui-corner-all">&lt;All employees</a>.

Attachments

Attach a sample if available, and screenshots, if applicable.
igtree__xml-binding issue.zip

IvayloG commented 4 years ago

@ymita This is XML specific and not reproducible with JSON binding. In order for this to work, you can change the format so there is an empty space after the < XML entity replacement - like this " \< "

In short, replace: "\<All employees" with " \< All employees" OR even "\< All employees"

ymita commented 4 years ago

@IvayloG Thank you for your suggestion. The customer wonders which character cannot be contained in xml data. For example, &gt; can be supplied while &lt; cannot be. Is this considered a limitation of igTree?

IvayloG commented 4 years ago

@ymita I will further investigate this issue as it may require an actual behavior fix.